Open redevrx opened 1 year ago
@redevrx can you fix the description? And what is "Flutter Pre-push"?
@incendial Hello, I want to set up a pre-commit hook that runs the "flutter analyze" command. When it encounters incorrect code, it will report an error and prevent the commit from proceeding. This works well. However, when I use "flutter pub run dart_code_metrics:metrics analyze lib", it detects incorrect code but doesn't stop the process. It continues running until the pre-commit hook is finished.
@redevrx have you tried passing dedicated flags to the CLI https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/src/cli/commands/analyze_command.dart#L176?
Environment and configuration
DCM version: Dart SDK version:
Configuration
```yaml environment: sdk: '>=3.0.0 <4.0.0' flutter: ">=1.17.0" dependencies: flutter: sdk: flutter dio: ^5.1.2 http_parser: ^4.0.2 dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.0 build_runner: ^2.3.3 flutter_lints: ^2.0.1 coverage: ^1.6.3 dart_code_metrics: ^5.7.4What did you do?
Flutter Pre-push not working with dart_code_metrics i have error Missing blank line before return. but pre-psuh not break.
What did you expect to happen?
pre-push want break when have error analyze
What actually happened?
pre-push not working with dart_code_metrics
Participation
Additional comments
No response