Coder Social home page Coder Social logo

mateuszszklarek / danger-flutter_lint Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 5.0 29 KB

A Danger Plugin to lint dart files using flutter analyze command line interface.

License: MIT License

Ruby 100.00%
flutter flutterlint flutter-analyze dart danger danger-plugin

danger-flutter_lint's Issues

`flutter analyze --write` breakes the parsing

flutter analyze takes --write=path/report-name.txt option argument. Reports generated in this way are slightly different than the flutter analyze, making flutter_lint unable to parse the results:

$ flutter analyze --no-fatal-infos --no-fatal-warnings > flutter_analyze_report.txt
1 issue found. (ran in 12.0s)
$ cat flutter_analyze_report.txt
Analyzing rtyst_flutter...                                      
   info • Sort constructor declarations before other members • lib/main.dart:23:3 • sort_constructors_first
$ flutter analyze --no-fatal-infos --no-fatal-warnings --write=flutter_analyze_report.txt
Analyzing rtyst_flutter...                                      
   info • Sort constructor declarations before other members • lib/main.dart:23:3 • sort_constructors_first
1 issue found. (ran in 13.2s)
$ cat flutter_analyze_report.txt
[info] Sort constructor declarations before other members (/builds/rtyst/rtyst_flutter/lib/main.dart:23:3)

Because --write is the supported way for flutter to generate reports, flutter_lint should work with it.

Report formatting issues with dartfmt

Would it be possible to also report formatting issues by calling dartfmt/flutter format? I currently have an action that calls the following:

find . -name *.dart -not -path "./lib/generated/*" -exec flutter format --set-exit-if-changed --dry-run {} +

and fails if it finds any formatting issues, but it would be amazing if they could be reported like the flutter analyze output. It doesn't need to report specific issues, even just "Formatting issues found" as a warning on the filename would be great.

Allow to run only on modified lines

First, thanks for this, I would be cool to have an option to run it only over modified files

Current

There's an option to run only on modified files only_modified_files,

Expected

Be able to run only over modified files, too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.