This repository was archived by the owner on Jun 18, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 69
Add clj-kondo config, fix all linter warnings/errors #477
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #477 +/- ##
==========================================
+ Coverage 86.23% 86.40% +0.17%
==========================================
Files 100 100
Lines 14379 14405 +26
Branches 752 749 -3
==========================================
+ Hits 12400 12447 +47
+ Misses 1227 1209 -18
+ Partials 752 749 -3
Continue to review full report at Codecov.
|
sritchie
commented
Feb 12, 2022
.clj-kondo/config.edn
Outdated
:output {:exclude-files ["src/data_readers.clj"]} | ||
:linters | ||
{:unresolved-symbol | ||
{:exclude [(pattern.rule/rule) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get the rules one working and get this out!
a32991b
to
ecb6c0f
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR closes #378.
Add clj-kondo config, fix all linter warnings/errors #477:
Adds tight integration with the
clj-kondo
linter via an exportedclj-kondo configuration in the
resources
directory. All macros in thelibrary now offer pleasant linting to users. This is especially helpful for
the macros in
pattern.rule
, which now can offer live feedback topattern-matching authors.
See
doc/linting.md
for details on various warnings reported, andinstallation instructions for the clj-kondo config.
Thanks to @borkdude for all of his help getting this working, and making
this amazing project!
All linter errors and warnings are now addressed, fixed and silenced for the
entire codebase, both
test
andsrc
directories.A new Github Action will run the linter for every PR and push to master, and
annotate PRs with linter warnings and errors.
com.gfredericks/test.chuck
dev dependency upgraded to0.2.13
to grab itsclj-kondo exported config.
I found the following bugs with the help of the linter:
Deleted the unused
sicmutils.differential/d:apply
.Fixed a bug with
sicmutils.expression.render/->JavaScript
not using thesecond argument to
remainder
.deleted
sicmutils.numerical.quadrature.common
in favor ofsicmutils.generic/infinite?
Fixed a broken integrator in
sicmutils.numerical.quadrature.simpson38
,and fixed the tests to actually stress this code.
Fixed a bug where
sicmutils.numerical.quadrature.substitute/exponential-upper
was notactually using its input function!
unused
simplify
argument removed fromsicmutils.simplify.rules/non-negative-factors!
and all uses.Bug fix in
sicmutils.special.elliptic/jacobi-elliptic-functions
; deep inthe gnarly fn, one of the branches returned nil instead of its required
values. Thank you, linter!
pattern.rule
patterns can now handle spliced and unquote-spliced inputs intheir symbol position.
sicmutils.pattern/template
will no longer error in the 1-arity case whensome form contains a binding entry like
(? (fn [m] ...))
. Instead, thefunction will be passed an empty map.