greglook / cljstyle

A tool for formatting Clojure code
Eclipse Public License 1.0
293 stars 39 forks source link

Make ignore behavior match documentation #91

Closed robhanlon22 closed 7 months ago

robhanlon22 commented 2 years ago

The configuration doc says this under the :ignore bullet point:

...patterns are matched against the entire (relative) file path...

However, this is not the case in the implementation, as cljstyle.config/ignored? uses the canonical path, rather than a relatived version of it.

To match the docs, this change relativizes the canonical path to the file against the JVM working dir. Hopefully this is the intended behavior :)

codecov-commenter commented 2 years ago

Codecov Report

Merging #91 (6514f77) into main (1f58e2e) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
+ Coverage   89.82%   89.85%   +0.02%     
==========================================
  Files          20       20              
  Lines        1907     1912       +5     
  Branches       60       60              
==========================================
+ Hits         1713     1718       +5     
  Misses        134      134              
  Partials       60       60              
Impacted Files Coverage Δ
src/cljstyle/config.clj 81.30% <100.00%> (+0.41%) :arrow_up:

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 1f58e2e...6514f77. Read the comment docs.