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

Fix: match behavior of declare linter to checkdoc #272

Merged
merged 4 commits into from
Oct 30, 2024

Conversation

joshbax189
Copy link
Contributor

Fixes #271

Summary

  • --strict formats warnings like errors and exits with status 1
  • extra message output of check-declare-file is hidden
  • set allow-errors to 'always' in code so that all files are linted

After the change:

> ~/git/eask-cli/bin/eask lint declare --strict
`js-comint.el` with check-declare
js-comint.el:148:Warning (check-declare): said ‘nvm--find-exact-version-for’ was defined in .eask/31.0.50/elpa/nvm-20240921.1901/nvm.el: arglist mismatch


`test-js-comint.el` with check-declare
No issues found

(Total of 2 files have checked)

The output line is formatted like an error and the exit code is 1.

Questions

Perhaps 'Warning (check-declare)' should be removed from the output?
e.g. this seems like a better message

js-comint.el:148: ‘nvm--find-exact-version-for’ was defined in .eask/31.0.50/elpa/nvm-20240921.1901/nvm.el: arglist mismatch

@@ -34,10 +39,10 @@
(errors))
(eask-lint-first-newline)
(eask-msg "`%s` with check-declare" (ansi-green file))
(setq errors (check-declare-file filename))
(setq errors (dlet ((inhibit-message 't)) (check-declare-file filename)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean let here? 🤔 Maybe we can use eask--silent instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I've used that instead. I thought that you needed dlet to use inhibit-message like that...

@jcs090218 jcs090218 added the bug Something isn't working label Oct 29, 2024
@jcs090218
Copy link
Member

Thank you for taking care of this! Merged!🥳

@jcs090218 jcs090218 merged commit ffecfd7 into emacs-eask:master Oct 30, 2024
141 of 143 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'declare' linter does not obey --strict option
2 participants