Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

fix: temporary remove enums support #849

Merged
merged 3 commits into from May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@

* fix: [`avoid-border-all`](https://dartcodemetrics.dev/docs/rules/flutter/avoid-border-all) is triggered even when it is not a const.
* fix: remove duplicated and ignore void function calls for [`prefer-moving-to-variable`](https://dartcodemetrics.dev/docs/rules/common/prefer-moving-to-variable).
* fix: temporary remove enums support for [`prefer-trailing-comma`](https://dartcodemetrics.dev/docs/rules/common/prefer-trailing-comma).

## 4.15.1

Expand Down
Expand Up @@ -28,13 +28,6 @@ class _Visitor extends RecursiveAstVisitor<void> {
);
}

@override
void visitEnumDeclaration(EnumDeclaration node) {
super.visitEnumDeclaration(node);

_visitNodeList(node.constants, node.leftBracket, node.rightBracket);
}

@override
void visitListLiteral(ListLiteral node) {
super.visitListLiteral(node);
Expand Down
Expand Up @@ -35,7 +35,7 @@ enum FirstEnum {
thirdItem,
forthItem,
fifthItem,
sixthItem // LINT
sixthItem
}

class FirstClass {
Expand Down
Expand Up @@ -30,16 +30,15 @@ void main() {

RuleTestHelper.verifyIssues(
issues: issues,
startLines: [3, 9, 13, 18, 24, 28, 38, 49, 58, 64, 70],
startColumns: [50, 7, 5, 52, 9, 8, 3, 59, 3, 3, 3],
startLines: [3, 9, 13, 18, 24, 28, 49, 58, 64, 70],
startColumns: [50, 7, 5, 52, 9, 8, 59, 3, 3, 3],
locationTexts: [
'String thirdArgument',
"'and another string for length exceed'",
'String arg3',
'String thirdArgument',
"'and another string for length exceed'",
"'some other string'",
'sixthItem',
'this.forthField',
"'and another string for length exceed'",
"'and another string for length exceed'",
Expand All @@ -56,7 +55,6 @@ void main() {
'Prefer trailing comma.',
'Prefer trailing comma.',
'Prefer trailing comma.',
'Prefer trailing comma.',
],
replacementComments: [
'Add trailing comma.',
Expand All @@ -69,7 +67,6 @@ void main() {
'Add trailing comma.',
'Add trailing comma.',
'Add trailing comma.',
'Add trailing comma.',
],
replacements: [
'String thirdArgument,',
Expand All @@ -78,7 +75,6 @@ void main() {
'String thirdArgument,',
"'and another string for length exceed',",
"'some other string',",
'sixthItem,',
'this.forthField,',
"'and another string for length exceed',",
"'and another string for length exceed',",
Expand All @@ -102,8 +98,8 @@ void main() {

RuleTestHelper.verifyIssues(
issues: issues,
startLines: [9, 17, 19, 37, 41, 75, 91, 99, 109, 119],
startColumns: [21, 33, 20, 23, 19, 18, 43, 21, 19, 19],
startLines: [9, 17, 19, 37, 41, 91, 99, 109, 119],
startColumns: [21, 33, 20, 23, 19, 43, 21, 19, 19],
locationTexts: [
'String arg1',
'void Function() callback',
Expand All @@ -114,7 +110,6 @@ void main() {
'() {\n'
' return;\n'
' }',
'firstItem',
'0',
'\'some string\'',
'\'some string\'',
Expand All @@ -130,7 +125,6 @@ void main() {
'Prefer trailing comma.',
'Prefer trailing comma.',
'Prefer trailing comma.',
'Prefer trailing comma.',
],
);
});
Expand Down