Fix :include-macros error in cljc and cljs #1834
Merged
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.
Please answer the following questions and leave the below in as part of your PR.
I have read the developer documentation.
This PR corresponds to an issue with a clear problem statement.
This PR contains a test to prevent against future regressions
I have updated the CHANGELOG.md file with a description of the addressed issue.
Closes #1830
Some jumbled thoughts:
Went to fix the above and realized that this should probably be expanded to a new linter so I wrote it. Makes me wonder if we're gonna need either a "all :require lints" linter with various options or if this step-by-step process is fine.There's a couple levels of granularity to the config, which feels messy.:include-macros
,:allow-clojure
,:unknown-require-options
, and which dialect is being checked all affect this, meaning we have 16 different combinations (some of which have the same outcome). Is there a way to lower this?I noticed that for:refer-macros
, we're not throwing any warnings if in a.clj
file, so that's an area for improvement later down the line. Maybe this shouldn't be:include-macros
specific but:dialect-require-options
or something?Excised the new linter, just throwing
:syntax
error if:include-macros
's opt isn't literaltrue
. Also checks for cljc and cljs now.I changed the
:unknown-require-option
default to:off
as all new linters should be off by default.