Comments (7)
The problem is that the rule implementation for autocorrect is not respecting the new affect_initializers
configuration (which defaults to false
). This means that linting behavior didn't change with the new release, but autocorrection did.
from swiftlint.
The problem is that the rule implementation for autocorrect is not respecting the new
affect_initializers
configuration (which defaults tofalse
). This means that linting behavior didn't change with the new release, but autocorrection did.
Aha ... then this should be an easy fix.
from swiftlint.
Hm ... so is this rule useful for initializers at all? Feels like valid findings would be rare.
from swiftlint.
I think it has its uses for initializers, but the chance of breaking the build is too high.
If it was an opt-in-only rule it would be more clear which rule caused the issue.
Also, not-autofixing the initializers and instead showing a warning only would allow it to easily disable the rule for this very initializer if the situation outlined in the stack overflow issue occurs.
from swiftlint.
Disabling the rule for a specific initializer should work anyway. Doesn't it?
As the rule has been available for the last two releases already, changing it to opt-in would be breaking and could lead to surprises. Not sure yet if we should do that.
from swiftlint.
from swiftlint.
The problem is that the rule implementation for autocorrect is not respecting the new
affect_initializers
configuration (which defaults tofalse
). This means that linting behavior didn't change with the new release, but autocorrection did.
that explains what we experienced
from swiftlint.
Related Issues (20)
- Substitution support in custom rules
- Opening brace auto-fix removes brace causing compilation error HOT 2
- swiftlint_linux.zip asset missing for 0.56.0 Release HOT 1
- SwiftLint 0.56.1 is not available via Homebrew HOT 6
- false alarm on `control_statement`? HOT 2
- Build failure since Xcode 16 Beta 5 HOT 7
- 0.56.1 not published to Bazel Central Registry HOT 3
- `unused-parameter` rule should not trigger on binding closure parameter HOT 1
- `unused-parameter`: Support configuring parameter names to ignore HOT 7
- `unused-parameter` rule should not trigger on parameters used for their type HOT 2
- `unused-parameter` rule should not trigger on `override` functions HOT 2
- `prefer_key_path` rule should not trigger on macros
- Incompatibility with Swift `@Observable` macro classes defined with customized coding keys. HOT 4
- "no_empty_block" causes default functions in protocols to be detected HOT 1
- Create a standalone repo for the SwiftLint plugins HOT 4
- Opening brace auto-fix removes code comments HOT 1
- `contrasted_opening_brace` false positives in trailing closures and `else if` statements HOT 3
- Refinement of `unneeded_override` Rule to Properly Handle Swift Attributes HOT 1
- `file_types_order` stopped working with partial `order` set HOT 1
- `no_empty_block` not triggered in SwiftUI button HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftlint.