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

language detection error #54

Closed
adam-moss opened this issue Jul 29, 2017 · 7 comments
Closed

language detection error #54

adam-moss opened this issue Jul 29, 2017 · 7 comments
Labels

Comments

@adam-moss
Copy link
Contributor

Just had the following output from commitlint, where it has incorrectly detected the language:

input: feat(commitlint-config-default): add default commitlint rules
⚠   commit must be in languague "eng", was one of: fra, cat, src, spa, sco [lang]
⚠   found 0 problems, 1 warnings

Running npx franc-cli "feat(commitlint-config-default): add default commitlint rules" yields cat as the result 😖

(Also note the minor typo in the error message)

@marionebl marionebl added the bug label Jul 30, 2017
@marionebl
Copy link
Contributor

Yeah, all the rules based on natural language processing are rather flaky. I see the following options:

  • Experiment with remote API solutions and see if those yield better results
  • Deprecate, then remove the NLP rules: body-tense, footer-tense, lang, subject-tense

@adam-moss
Copy link
Contributor Author

So for my use-case the first option would be a no-go because of an air gapped environment.

To be honest I'd leave them as is, it doesn't matter too much if they're in warning mode, but might be worth updating the docs to say you might get problems in error mode, if the text sample is relatively short ?

@marionebl
Copy link
Contributor

Thanks for bringing the unknown constraints of development environments to the table, that rules out remote API usage.

My goal for commitlint is being as seamless as eslint, possibly adding autofix capabilities and commit message suggestions in the very long run. Keeping around flaky rules will prevent the tool from achieving that.

That being said I'd do this by deprecating them in some of the 2.x releases by warning on stderr if they are used and remove them with the 3.0 release the earliest.

@marionebl
Copy link
Contributor

marionebl commented Aug 7, 2017

Typo fixed at marionebl/commitlint@fd56dff, will ship with next release

@morewry
Copy link

morewry commented Oct 13, 2017

I ran into this too immediately after initially setting up.

⧗   input: chore(*): suggest project setup
⚠   ...
⚠   commit must be in language "eng", was one of: src, fra, spa, por, bos [lang]
⚠   found 0 problems, 2 warnings

You'd said back in July you planned to address this in 3.0, did that not happen? Every commitlint dependency I have is > 3, I'm using these:

"@commitlint/cli": "^4.1.1",
 "@commitlint/config-angular": "^3.1.1",
"@commitlint/config-lerna-scopes": "^4.1.1",

Update: If there is a way to suppress warnings and only output errors that would be very useful to me for both this issue and for https://github.com/marionebl/commitlint/issues/78. It would hide the noise from the rest of the team. I didn't see anything in the docs that looked like such an option...is there one?

@marionebl
Copy link
Contributor

marionebl commented Oct 13, 2017

Due to other breaking changes I bumped to 3.0 earlier - the plan is to remove the functionality because the false positives are to frequent for texts as short as commits.

The removal will happen with one of the next major bumps, one of the releases before then will contain new deprecation warnings.

Edit: Currently there is no easy way to filter warnings from the output. As we are discussing commitlint bugs here I think we should not hide the symptom (the warnings) but fix the actual issue. For #78 there is a fix underway, and the nlp rules will be removed in the near future.

@lostintangent
Copy link

I just recently adopted commitlint, and the lang and subject-tense rules result in false negative warnings for every commit. I'd definitely love to see them removed/improved, so that my commit lint runs were "clean". Ideally, any error or warning would be actionable, so that they're worth paying attention to.

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

No branches or pull requests

4 participants