GithubHelp home page GithubHelp logo

github-action-repolinter's Introduction

GitHub Action for TODO group's Repolinter!

Marketplace Release .github/workflows/lint.yml

This Action wraps repolinter allowing easy linting of your repository!

Contents

Inputs

  • args - Optional. These are the arguments to pass to the repolinter CLI.

Environment Variables

Example Usage

Vanilla

repolinter CLI will automatically lint your repository`:

name: Lint repository
on: [push]

jobs:
  repo-lint:
    name: "repolint"
    runs-on: ubuntu-latest
    steps:
      - name: "checkout repo"
        uses: actions/[email protected]
        with:
          fetch-depth: 0
      - name: Test repolinter
        uses: philips-labs/github-action-repolinter@master

Custom configuration file:

Specify the configuration file:

name: Lint repository
on: [push]

jobs:
  repo-lint-custom:
    name: "repolint custom"
    runs-on: ubuntu-latest
    steps:
      - name: "checkout repo"
        uses: actions/[email protected]
        with:
          fetch-depth: 0
      - name: Test repolinter
        uses: philips-labs/github-action-repolinter@master
        env:
          CUSTOM_REPOLINT_FILE: repolint.json

Scan external git repository

Specify the configuration file:

name: Lint repository
on: [push]

jobs:
  repo-lint-git:
    name: "repolint git"
    runs-on: ubuntu-latest
    steps:
      - name: Test repolinter
        uses: philips-labs/github-action-repolinter@master
        with:
          args: --git https://github.com/philips-labs/garo

Scan external git repository and custom configuration

Specify the configuration file:

name: Lint repository
on: [push]

jobs:
  repo-lint-git-custom:
    name: "repolint git custom"
    runs-on: ubuntu-latest
    steps:
      - name: "checkout repo"
        uses: actions/[email protected]
        with:
          fetch-depth: 0
      - name: Test repolinter
        uses: philips-labs/github-action-repolinter@master
        with:
          args: --git https://github.com/philips-labs/garo
        env:
          CUSTOM_REPOLINT_FILE: repolint.json

Examples

example repo

Contributors

Thanks goes to these contributors!

License

MIT License

github-action-repolinter's People

Contributors

jeroenknoops avatar shemnon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

shemnon syllogy

github-action-repolinter's Issues

CUSTOM_REPOLINT_FILE not respected

Hi,

Thanks for putting this together! Much appreciated.

I don't think the CUSTOM_REPOLINT_FILE environment variable is respected by the underlying repolinter code in the way you are expecting. I tested this here: craigez/license-text-normalizer-js#1

When I don't set CUSTOM_REPOLINT_FILE ENV variable the repolint.json you have included in the action repository is run. When I specify CUSTOM_REPOLINT_FILE, repolinter picks up the default rules set in repolinter installation, not my custom ruleset in my repository. Where you expecting repolinter to do something with the Environment variable?

I was looking at this as part of the Todogroup activities. We are working out the best way path forward to support a GitHub action for repolinter as part of Todogroup activities. We were looking at both your action and the one from newrelic: https://github.com/newrelic/repolinter-action. It seems this is a subset of the newrelic functionality. Though, the docker approach taken here has advantages as the ruby dependencies could be installed (licensee and linguist). (As an aside, if you move the npm install into the Dockerfile I think GitHub Actions will cache the container image and reduce the runtime of the action).

FYI: we are currently reviewing a large PR to repolinter from newrelic: todogroup/repolinter#174

Regards,
Craig

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.