Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rules exceptions not possible or undocumented #19

Open
ssbarnea opened this issue Jan 29, 2018 · 2 comments
Open

rules exceptions not possible or undocumented #19

ssbarnea opened this issue Jan 29, 2018 · 2 comments

Comments

@ssbarnea
Copy link
Contributor

I have a very simple use case where topy fails on a YAML file by trying to add case:

- foo/jordan

Topy would rename jordan to Jordan, which will break the code as this is a filename.

Few problems related to this:

  • topy does not mention which rules was used in this case
  • topy has no command line parameter to enable more verbose mode (ex. to identify the rule used)
  • no option to disable topy or rule per specific line, file or repository.
@intgr
Copy link
Owner

intgr commented Jan 29, 2018

+1 for adding some way to configure exceptions in Topy. But note that I haven't had motivation to work on this project for a long time.

I think there will always be false positives like this with Topy, and adding exceptions for rules will be a game of whack-a-mole. The ruleset is not maintained by me but comes from Wikipedia, so every update can bring unexpected regressions.

So by design, integrating Topy into a CI pipeline doesn't seem like a good idea IMO. That's also why I haven't merged #18 yet, I'm uncertain whether the documentation should encourage that kind of use.

@ssbarnea
Copy link
Contributor Author

ssbarnea commented Jan 29, 2018

@intgr Thanks for the quick and detailed update on this. I found topy after a colleague recommended it as he implemented it on one of his repos. With minimal effort, I was able to do the same last week, when it fixed >100 typos without even one false positive. After this I added it as a gate, and today I found this issue.

I guess that in short term is to make the gate non failing as any kind of fix would take a lot of time.

If you are aware about other similar project that could do the same please let me know. As it happens I am interested mostly about py/yaml/json/ini/rst files.

I think that Wikipedia is using it for text content and not for code.

BTW, If you are not sure that you can invest more into the future of topy you could consider transfering it under pycontribs github organisation in order to allow more people to maintain it.

Still, at this point I am not even sure if there is a way of fixing topy. I do understand that Jordan is the correct spelling, and at this moment there is not even an option to disable all lowercase rules.

I think at least for the moment, the only solution is to disable it.

April 2018 update: I decided to switch to https://www.npmjs.com/package/cspell as this speller seems to be allow for custom dictionaries and excludes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants