GithubHelp home page GithubHelp logo

yutailang0119 / action-android-lint Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 10.0 3.1 MB

GitHub Action for Android Lint

License: MIT License

TypeScript 98.09% JavaScript 1.91%
android-lint android github-actions typescript

action-android-lint's Introduction

action-android-lint status

GitHub Action for Android Lint

This Action generates annotations from Android Lint Report XML.

Usage

An example workflow(.github/workflows/android-lint.yml) to executing Android Lint follows:

name: AndroidLint

on:
  pull_request:
    paths:
      - .github/workflows/android-lint.yml
      - '*/src/**'
      - gradle/**
      - '**.gradle'
      - gradle.properties
      - gradlew*

jobs:
  android-lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 1
      - name: set up JDK
        uses: actions/setup-java@v4
        with:
          distribution: zulu
          java-version: 21
          cache: gradle
      - run: ./gradlew lint
      - uses: yutailang0119/action-android-lint@v4
        with:
          report-path: build/reports/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob
          ignore-warnings: true # Ignore Lint Warnings
        continue-on-error: false # If annotations contain error of severity, action-android-lint exit 1.

Author

Yutaro Muta

References

License

action-android-lint is available under the MIT license. See the LICENSE file for more info.

action-android-lint's People

Contributors

aleksandr-deich avatar dependabot[bot] avatar szedlakmate avatar yutailang0119 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

action-android-lint's Issues

Support glob for xml_path

I'm currently adding this action to a project of mine and I looking at the code the xml_path does not support globbing. It would be nice if we could specify **/lint-results.xml as path for Gradle projects with multiple Android modules.

Wildcards in XML path

It would be nice to have wildcards in 'xml_path':

- name: Generate Lint Annotations
  uses: yutailang0119/[email protected]
  with:
    xml_path: '**/build/reports/lint-results-*.xml'

Wildcards should be compatible with workflow syntax:

  • *: Matches zero or more characters, but does not match the / character.
  • **: Matches zero or more of any character.

Currently, it is necessary to provide a specific path, e.g.:

- name: Generate Lint Annotations
  uses: yutailang0119/[email protected]
  with:
    xml_path: ${{ github.workspace }}/app/build/reports/lint-results-debug.xml

more documentation needed

"This Action generates annotations from Android Lint Report XML."
does not adequately convey what this action does.

What is annotated and where are these annotations stored?

Action only fails if all specified reports contain errors

The action isn't failing as expected on specifying two reports, and only one of them contains errors and warnings.

I have set up a repository for demonstrating the issue. https://github.com/ashutoshgngwr/action-android-lint-test

Commit Description Expected result Actual result
ashutoshgngwr/action-android-lint-test@a6cc623 Both the Lint reports contain errors Exit with an error Exited with an error
ashutoshgngwr/action-android-lint-test@d09228b One of the two Lint reports contains errors Exit with an error Exited without an error

README example usage potential misspell

In the README.md line 38, on the section

- run: ./gradlew lint
- uses: yutailang0119/action-android-lint@v1

Is the second - needed right before the "uses"? All other actions I've seen don't have that, so I am assuming this is a simple misspell? If yes it'd be great to remove it, if no then what is the purpose of it?

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.