Allow to not return 255 status code when typo is found #5

Open
opened 2023-05-02 18:56:55 +00:00 by rffontenelle · 0 comments
Contributor

Currently, pospell returns 255 when an error is found and 0 when it is found.

When running it in a script that exits on non-zero status code (e.g. bash -e), it forces the scripter to use || true or any other means to ignore all errors.

However ignoring all errors will always not stop on other more critical errors, like dictionary missing, pospell not installed, etc.

Can we have have a flag that does not emit 255 status code when typo is found?

pospell version: 1.1

Steps to reproduce:

  1. Run a po file known to not have typos:
$ pospell -l pt_BR -p dict c-api/index.po
$ echo $?
0
  1. Now, one having typos:
$ pospell -l pt_BR -p dict whatsnew/index.po
whatsnew/index.po:33:What
whatsnew/index.po:33:New
whatsnew/index.po:33:must
$ echo $?
255
Currently, pospell returns 255 when an error is found and 0 when it is found. When running it in a script that exits on non-zero status code (e.g. `bash -e`), it forces the scripter to use `|| true` or any other means to ignore all errors. However ignoring all errors will always not stop on other more critical errors, like dictionary missing, pospell not installed, etc. Can we have have a flag that does not emit 255 status code when typo is found? pospell version: 1.1 Steps to reproduce: 1. Run a po file known to not have typos: ```shell $ pospell -l pt_BR -p dict c-api/index.po $ echo $? 0 ``` 2. Now, one having typos: ```shell $ pospell -l pt_BR -p dict whatsnew/index.po whatsnew/index.po:33:What whatsnew/index.po:33:New whatsnew/index.po:33:must $ echo $? 255 ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AFPy/pospell#5
No description provided.