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

Create formatting-stack.classpath-linter #113

Open
vemv opened this issue Jan 28, 2020 · 0 comments
Open

Create formatting-stack.classpath-linter #113

vemv opened this issue Jan 28, 2020 · 0 comments
Assignees

Comments

@vemv
Copy link
Contributor

vemv commented Jan 28, 2020

Context

There are 3 sets of defaults: defaults, branch-formatter, project-formatter.

None of those can lint clj nses beyond a given project, e.g. reachable through the classpath.

That's generally reasonable (one doesn't want to lint 3rd-party code), but now the new formatting-stack.linters.one-resource-per-ns linter would maximise its usefulness by linting these nses.

Task

  • Create formatting-stack.classpath-linter, analog to project-formatter
    • but with a classpath-wide scope
    • should only lint, not format
    • should only run formatting-stack.linters.one-resource-per-ns
      • No much point in a broader linting for 3rd party code
  • Create a strategy that traverses clj namespaces recursively
    • project namespaces -> namespaces from our deps -> namespaces from transitive deps -> ...

Acceptance criteria

One can catch this specific instance:

'("jar:file:/Users/vemv/.m2/repository/clojure-future-spec/clojure-future-spec/1.9.0-beta4/clojure-future-spec-1.9.0-beta4.jar!/clojure/core/specs/alpha.clj"
  "jar:file:/Users/vemv/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar!/clojure/core/specs/alpha.clj")

Additional resources

#112

@vemv vemv self-assigned this Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant