Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Conversation

sritchie
Copy link
Member

@sritchie sritchie commented Feb 11, 2022

This PR closes #378.

  • Add clj-kondo config, fix all linter warnings/errors #477:

    • Adds tight integration with the
      clj-kondo linter via an exported
      clj-kondo configuration in the resources directory. All macros in the
      library now offer pleasant linting to users. This is especially helpful for
      the macros in pattern.rule, which now can offer live feedback to
      pattern-matching authors.

      See doc/linting.md for details on various warnings reported, and
      installation 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 and src 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 to 0.2.13 to grab its
      clj-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 the
        second argument to remainder.

      • deleted sicmutils.numerical.quadrature.common in favor of
        sicmutils.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 not
        actually using its input function!

      • unused simplify argument removed from
        sicmutils.simplify.rules/non-negative-factors! and all uses.

      • Bug fix in sicmutils.special.elliptic/jacobi-elliptic-functions; deep in
        the 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 in
        their symbol position.

      • sicmutils.pattern/template will no longer error in the 1-arity case when
        some form contains a binding entry like (? (fn [m] ...)). Instead, the
        function will be passed an empty map.

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2022

Codecov Report

Merging #477 (961b5bc) into main (babf519) will increase coverage by 0.17%.
The diff coverage is 79.81%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
src/sicmutils/abstract/number.cljc 85.83% <ø> (ø)
src/sicmutils/calculus/basis.cljc 84.84% <0.00%> (ø)
src/sicmutils/calculus/connection.cljc 93.91% <ø> (-0.05%) ⬇️
src/sicmutils/calculus/coordinate.cljc 89.23% <ø> (ø)
src/sicmutils/calculus/covariant.cljc 85.46% <ø> (ø)
src/sicmutils/calculus/curvature.cljc 64.00% <ø> (ø)
src/sicmutils/calculus/derivative.cljc 78.21% <ø> (ø)
src/sicmutils/calculus/form_field.cljc 89.83% <ø> (ø)
src/sicmutils/calculus/frame.cljc 78.12% <ø> (ø)
src/sicmutils/calculus/indexed.cljc 79.72% <ø> (ø)
... and 83 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update babf519...961b5bc. Read the comment docs.

:output {:exclude-files ["src/data_readers.clj"]}
:linters
{:unresolved-symbol
{:exclude [(pattern.rule/rule)
Copy link
Member Author

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!

@sritchie sritchie changed the title Add clj-kondo aliases, address warnings / errors Add clj-kondo config, fix all linter warnings/errors Feb 15, 2022
@sritchie sritchie merged commit b8cd4ee into main Feb 15, 2022
@sritchie sritchie deleted the sritchie/kondo branch February 15, 2022 22:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add clj-kondo config

2 participants