Skip to content

Conversation

@knocte
Copy link
Collaborator

@knocte knocte commented Dec 31, 2023

Supersedes #590

Fixes #535

knocte and others added 3 commits December 31, 2023 12:52
Added failing test for FavourNonMutablePropertyInitialization
rule for case when property assignent is not the last
statement.
Fix FavourNonMutablePropertyInitialization rule for cases when
threre are statements after property assignment.
@knocte knocte force-pushed the favourNonMutablePropertyInitialization-rebased branch 3 times, most recently from c522018 to 691e258 Compare January 4, 2024 04:07
Added failing test for FavourNonMutablePropertyInitialization
rule for case when mutable variable is assigned (false
positive).
Fix false positive in FavourNonMutablePropertyInitialization
when local variable is assigned and not object property.
Use property initialization instead of property mutation as
suggested by FavourNonMutablePropertyInitialization rule.
Added failing test for FavourNonMutablePropertyInitialization
rule for case when several properties are assigned.
Fix in FavourNonMutablePropertyInitialization rule for case
when several properties are assigned.
Added failing tests for FavourNonMutablePropertyInitialization
rule for different constructs that may contain instance
creation with subsequent property initialization.
Rewrite FavourNonMutablePropertyInitialization rule code so
that more cases are covered and not only code in modules and
functions.
Use property initialization instead of property mutation as
suggested by FavourNonMutablePropertyInitialization rule.
@knocte knocte force-pushed the favourNonMutablePropertyInitialization-rebased branch from 2009317 to e16875e Compare January 4, 2024 04:17
@knocte
Copy link
Collaborator Author

knocte commented Jan 16, 2024

Superseded by #683

@knocte knocte closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] New rule to prefer non-mutable property initialization

3 participants