-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
norminette-action@v2 (Norm version 2)
- Loading branch information
0 parents
commit ba2b115
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# norminette-action@v2 | ||
|
||
This GitHub Action checks if your code passes the 42School's norminette linter, after each push. | ||
See a demo on [alexandregv/norminette-action-demo](https://github.com/alexandregv/norminette-action-demo). | ||
|
||
**/!\\ This version (`@v2`) is for Norm version 2, if you want Norm version 3 please use [norminette-action@v3](https://github.com/alexandregv/norminette-action/tree/v3) /!\\** | ||
|
||
## Inputs | ||
|
||
### `flags` | ||
|
||
Description: Flags passed to norminette. | ||
Format: `[options] <path>` | ||
Default: `.` (all files) | ||
|
||
## Example usage | ||
|
||
```yml | ||
# .github/workflows/main.yml | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
norminette_job: | ||
runs-on: ubuntu-latest | ||
name: norminette | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: alexandregv/norminette-action@v2 | ||
with: | ||
flags: '.' | ||
``` | ||
## Badge | ||
You can add a badge () to show current norminette status by adding this markdown code to your README.md: | ||
```md | ||
 | ||
``` | ||
More infos on [GitHub Docs](https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/adding-a-workflow-status-badge). | ||
|
||
## See also | ||
|
||
* [norminette-action-demo](https://github.com/alexandregv/norminette-action-demo) - Demo repository for this action. | ||
* [norminette-docker](https://github.com/alexandregv/norminette-docker) - Docker image for norminette (used by this action). | ||
* [norminette-vim](https://github.com/alexandregv/norminette-vim) - Vim integration for norminette. Displays norm errors directly inside Vim. | ||
|
||
All of these are compatible with Norm version 2 and 3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: '42 Norminette' | ||
description: 'Check 42 Norm with norminette linter' | ||
author: 'Reach <[email protected]>' | ||
branding: | ||
icon: 'activity' | ||
color: 'gray-dark' | ||
|
||
inputs: | ||
flags: | ||
description: 'Flags passed to norminette' | ||
required: true | ||
default: '.' | ||
runs: | ||
using: 'docker' | ||
image: 'docker://alexandregv/norminette:v2' | ||
entrypoint: /bin/bash | ||
args: | ||
- -c | ||
- /usr/src/norminette/norminette.rb ${{ inputs.flags }} | grep -v "Not a valid file" | grep -B1 -E "^Error|Warning"; test $? -eq 1 |