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

Linter to warn when using an aliased keyword #1140

Closed
RickMoynihan opened this issue Jan 21, 2021 · 2 comments
Closed

Linter to warn when using an aliased keyword #1140

RickMoynihan opened this issue Jan 21, 2021 · 2 comments
Labels
expired expired - might be closed due to too little activity
Projects

Comments

@RickMoynihan
Copy link
Contributor

Problem

Using ::aliased/keywords rather than fully qualified namespaced keywords can cause developer friction when working with a code base, because such keywords cannot reliably be found / replaced etc with simple tools, e.g. grep.

Suggested solution

Adding a clj-kondo linter (probably :off by default) that could warn when an aliased keyword is used will allow a team to help ensure keyword call sites can more easily be found.

For example this code would generate a warning:

(ns blah.blah (:require [foo.bar :as bar]))
::bar/baz ;; <- WARNING: aliased keyword 
:foo.bar/baz ;; <-- ok
@borkdude
Copy link
Member

Related to #1129

@borkdude borkdude added this to Needs triage in clj-kondo via automation Jan 21, 2021
@borkdude borkdude removed this from Needs triage in clj-kondo Jan 21, 2021
@borkdude borkdude added this to Needs triage in clj-kondo via automation Jan 21, 2021
@borkdude borkdude moved this from Needs triage to Medium priority (new / enhance) in clj-kondo Jan 21, 2021
@stale
Copy link

stale bot commented Dec 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the expired expired - might be closed due to too little activity label Dec 3, 2021
@stale stale bot closed this as completed Jan 2, 2022
clj-kondo automation moved this from Medium priority (new / enhance) to Done Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expired expired - might be closed due to too little activity
Projects
clj-kondo
  
Done
Development

No branches or pull requests

2 participants