Giter Site home page Giter Site logo

base-flutter-project's Introduction

style: lint

Base Flutter Project

New Flutter project with SonarQube configuration, lint, pre-commit and pre-push.

SonarQube Features

See: Sonar Flutter Plugin

Feature Supported
Size YES
Issues YES (dartanalyzer rules)
Tests YES
Coverage YES
Complexity YES
Syntax YES

Pre requisites

Docker

Install Docker as explained on the official documentaiton page.

Install Docker

Flutter SDK

Install Flutter as explained on the official documentaiton page.

Installation instructions

Dart

Install Dart as explained on the official documentaiton page. If you have already installed flutter, it is not necessary to install Dart.

Install the Dart SDK

sonar-scanner (requires Java)

Install sonar-scanner as explained in the official documentation. It is recommended to place it in the system environment variables.

Installation instructions

Docker-compose

To start the sonarqube in the docker use the following command in root:

docker-compose up

Then check: http://localhost:9000/.

User: admin Password: admin It is recommended to change credentials after first login

Run analysis

Use the following commands from the root folder to start an analysis:

flutter pub get

flutter test

flutter test --machine --coverage > tests.output

sonar-scanner

or execute the sonar.sh in root of project in the root:

./sonar.sh

sonarQube.png

Flutter Lints

See: Flutter lints

Pre-commit and pre-push

The project was configured with githooks to format code in pre-commit and perform code analysis and testing in pre-push.

Run in the root:

git config core.hooksPath .githooks/

Problems with docker on Windows?

Run in powershell:

wsl -d docker-desktop

then

sysctl -w vm.max_map_count=262144

base-flutter-project's People

Contributors

gabrielinaciosouza avatar

Stargazers

Rafael Almeida Barbosa avatar Emanuel Gonçalves avatar

Watchers

 avatar

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.