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

Escape hatch / disable linter messages over regions #241

Closed
olafurpg opened this issue Jul 3, 2017 · 3 comments
Closed

Escape hatch / disable linter messages over regions #241

olafurpg opened this issue Jul 3, 2017 · 3 comments
Assignees
Milestone

Comments

@olafurpg
Copy link
Contributor

olafurpg commented Jul 3, 2017

Currently, scalafix runs all rewrites with no option to opt-out of rewrites over particular regions. It would be nice if scalafix offered an "escape hatch" to disable rewrites for particular regions. It could support a syntax like described by @ShaneDelmore in #238 (inlined below)

//scalafix: off. –disables scalafix for the rest of the file until
//scalafix: on is found
//scalafix: ignore –don’t scalafix this line (or method?) at all
//scalafix: ignore.RemoveUnused –Only ignore the RemoveUnused rewrite but apply any other matching rewrites.
//scalafix: ignore.{ RemoveUnused, ExplicitReturnTypes } –handle multiple ignores with a syntax similar to imports maybe?
@olafurpg
Copy link
Contributor Author

olafurpg commented Sep 8, 2017

Related discussion in #238 (comment)

@olafurpg
Copy link
Contributor Author

olafurpg commented Oct 6, 2017

Escape hatches for rewrites are blocked by #368. This should be quite simple to implement for linters, since each linter message is attached to a single position.

@MasseGuillaume MasseGuillaume self-assigned this Oct 31, 2017
@olafurpg olafurpg added this to the v0.5.4 milestone Oct 31, 2017
@olafurpg
Copy link
Contributor Author

Fixed by @MasseGuillaume in #415

@olafurpg olafurpg changed the title Escape hatch / disable rewrites over regions Escape hatch / disable linter messages over regions Nov 13, 2017
bjaglin pushed a commit to liancheng/scalafix that referenced this issue May 23, 2023
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants