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

Make :formatting-stack/ns-aliases understand a codebase's patterns #204

Closed
vemv opened this issue Mar 3, 2022 · 2 comments · Fixed by #205
Closed

Make :formatting-stack/ns-aliases understand a codebase's patterns #204

vemv opened this issue Mar 3, 2022 · 2 comments · Fixed by #205

Comments

@vemv
Copy link
Contributor

vemv commented Mar 3, 2022

Context

While :formatting-stack/ns-aliases is useful, it also can be annoying to use in an existing codebase with no particular inclination towards using Sierra's style.

The ns style is sometimes outside one's control e.g. I'm checking out a random repo.

f-s could try to be smarter there and not complain so easily - it is part of the project's spirit to avoid giving a wall of inflexible warnings.

Suggested task

A given project's :acceptable-aliases-whitelist is augmented with the set of aliases that are used in the project and not new (per git: they don't belong to the git status or the git branch diff)

Acceptance criteria

  • :acceptable-aliases-whitelist are augmented in a way that doesn't compromise overall accuracy
  • the project-wide analysis is cached
@thumbnail
Copy link
Member

alternatively, with greater configurability we could disable it by default and allow consumers to turn it on in their repo.

@vemv
Copy link
Contributor Author

vemv commented Mar 3, 2022

Sure thing, however what I had in mind is that one f-s can help one use Sierra's style for 'his' code, while not complaining at everything else.

It's pretty common in projects that there's no convention whatsoever for ns aliases (or that the convention is precisely 'do whatever you want').

So that's where a hybrid approach makes sense.

vemv added a commit to reducecombine/formatting-stack that referenced this issue Mar 9, 2022
vemv added a commit to reducecombine/formatting-stack that referenced this issue Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants