Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions gitgalaxy/standards/language_standards.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
| Cpp | 92.3% | 95.7% | 98.6% | 92.6% |
| Csharp | 99.2% | 99.8% | 91.7% | 100.0% |
| Css | 100.0% | 100.0% | N/A | N/A |
| Dart | 76.7% | 87.8% | 100.0% | 100.0% |
| Dart | 77.2% | 92.1% | 100.0% | 100.0% |
| Fortran | 98.4% | 88.3% | 100.0% | 100.0% |
| Go | 95.7% | 100.0% | 100.0% | 100.0% |
| Groovy | N/A | N/A | N/A | N/A |
Expand Down Expand Up @@ -9351,15 +9351,15 @@ class PrismConfigSchema(TypedDict):
r"(?!(?:(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+[ \t\n]+){0,5}?)(?:class|mixin|enum|extension|typedef|if|for|while|switch|catch|case|when|assert|return|throw|new|var|final|const(?![ \t\n]+(?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*[ \t\n]*(?:<[^>]*>[ \t\n]*)?\())\b)"
r"(?:(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+[ \t\n]+){0,4}?(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+(?<!,)[ \t\n]+))?"
r"(?!(?:class|mixin|enum|extension|typedef|if|for|while|switch|catch|case|when|assert|return|throw|new|var|final|const(?![ \t\n]+(?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*[ \t\n]*(?:<[^>]*>[ \t\n]*)?\()|Function)\b)"
r"(?:(?:get|set|factory|const)[ \t\n]+)?((?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*|operator[ \t\n]+[^\s\w]+)"
r"(?=[ \t\n]*(?:<[^>]*>[ \t\n]*)?(?:\(|=>|\{|;))"
r"(?:(?:(?P<getA>get)|set|factory|const)[ \t\n]+)?((?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*|operator[ \t\n]+[^\s\w]+)"
r"(?=[ \t\n]*(?:<[^>]*>[ \t\n]*)?(?:\(|=>|\{|(?(getA);|(?!))))"
r"|"
r"(?:(?:static|external|abstract|covariant|late)[ \t\n]+){0,5}"
r"(?!(?:(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+[ \t\n]+){0,5}?)(?:class|mixin|enum|extension|typedef|if|for|while|switch|catch|case|when|assert|return|throw|new|var|final|const(?![ \t\n]+(?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*[ \t\n]*(?:<[^>]*>[ \t\n]*)?\())\b)"
r"(?:(?!\?[ \t\n]+(?:get|set|factory|[a-zA-Z_]))(?:(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+[ \t\n]+){0,4}?(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+(?<!,)[ \t\n]+)))"
r"(?!(?:class|mixin|enum|extension|typedef|if|for|while|switch|catch|case|when|assert|return|throw|new|var|final|const(?![ \t\n]+(?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*[ \t\n]*(?:<[^>]*>[ \t\n]*)?\()|Function)\b)"
r"(?:(?:get|set|factory|const)[ \t\n]+)?((?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*|operator[ \t\n]+[^\s\w]+)"
r"(?=[ \t\n]*(?:<[^>]*>[ \t\n]*)?(?:\(|=>|\{|;))"
r"(?:(?:(?P<getB>get)|set|factory|const)[ \t\n]+)?((?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*|operator[ \t\n]+[^\s\w]+)"
r"(?=[ \t\n]*(?:<[^>]*>[ \t\n]*)?(?:\(|=>|\{|(?(getB);|(?!))))"
r"|"
r"(?!(?:(?:(?:[\w<>\[\],?]|\((?:[^()]|\([^()]*\))*\))+[ \t\n]+){0,5}?)(?:class|mixin|enum|extension|typedef|if|for|while|switch|catch|case|when|assert|return|throw|new|var|final|const(?![ \t\n]+(?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*[ \t\n]*(?:<[^>]*>[ \t\n]*)?\())\b)"
r"(?!(?:class|mixin|enum|extension|typedef|if|for|while|switch|catch|case|when|assert|return|throw|new|var|final|const(?![ \t\n]+(?:[a-zA-Z_]\w*\.)?[a-zA-Z_]\w*[ \t\n]*(?:<[^>]*>[ \t\n]*)?\()|Function)\b)"
Expand Down
5 changes: 5 additions & 0 deletions tests/extraction/languages/test_dart.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def test_dart_class_start_xfail_invalid(payload):
("Stream<int> countStream(int to) async* {", "countStream"),
("Future<\n Map<\n String,\n List<int>\n >\n> weirdSpacing() {", "weirdSpacing"),
("const ThemeData.raw({ int a = 1 }) {", "ThemeData.raw"),
("external void externalFunc();", "externalFunc"),
("String get name;", "name"),
],
"invalid": [
"var x = functionStart;",
Expand All @@ -117,6 +119,9 @@ def test_dart_class_start_xfail_invalid(payload):
"implements AutofillClient {",
"with AutomaticKeepAliveClientMixin {",
"extends ContextAction<T> {",
"AnimationController? foo;",
"SelectionChangedCause cause;",
"late List<Element> _children;",
# Issue #1493 (found during verification, not the issue's own scope): `assert` is
# a reserved Dart statement keyword, never a valid function/method name -- it was
# missing from func_start's keyword-exclusion lookahead, so `assert(...);` could be
Expand Down
Loading
Loading