Skip to content

Commit

Permalink
Merge pull request #142 from paulo-ferraz-oliveira/feature/gha
Browse files Browse the repository at this point in the history
Replace Travis CI with GitHub Actions
  • Loading branch information
elbrujohalcon authored Dec 11, 2020
2 parents 19978cc + fb1b69e commit 65f3ef4
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 23 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ci:
name: Run checks and tests over ${{matrix.otp_vsn}} and ${{matrix.os}}
runs-on: ${{matrix.os}}
container:
image: erlang:${{matrix.otp_vsn}}
strategy:
matrix:
otp_vsn: [19.3, 20.0, 21.3, 22.3, 23.1]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- run: |
rebar3 --version
erl -version
- run: rebar3 test
- run: |
rebar3 escriptize
_build/default/bin/elvis_core
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# elvis-core [![Build Status](https://travis-ci.org/inaka/elvis_core.svg?branch=master)](https://travis-ci.org/inaka/elvis_core) [![Stories in Ready](https://badge.waffle.io/inaka/elvis.png?label=ready&title=Ready)](https://waffle.io/inaka/elvis)
# elvis-core [![Build Status](https://github.com/inaka/elvis_core/workflows/build/badge.svg)](https://github.com/inaka/elvis_core) [![Stories in Ready](https://badge.waffle.io/inaka/elvis.png?label=ready&title=Ready)](https://waffle.io/inaka/elvis)

Erlang style reviewer core library.

Expand Down Expand Up @@ -79,7 +79,7 @@ We have only presented results where all files were well-behaved (respect all
the rules), so here's an example of how it looks when files break some of the
rules:

```
```erlang
# ../../test/examples/fail_line_length.erl [FAIL]
- line_length
- Line 14 is too long: " io:format(\"This line is 81 characters long and should be detected, yeah!!!\").".
Expand Down Expand Up @@ -166,20 +166,25 @@ also you like to use tabs instead of spaces, so you need to override `erl_files`
#### Ignoring Modules

You can also `ignore` modules at a _check level_ or at a _ruleset (group of checks) level_:

- at check level by setting the ignore parameter in the rule you want to skip, e.g:

```erlang
{elvis_style, no_debug_call, #{ignore => [elvis, elvis_utils]}}
```

There we are telling elvis to **ignore** _elvis_ and _elvis_utils_ modules when running `no_debug_call` check.

- at ruleset level by setting the **ignore** group level option for the group you want to skip, e.g:

```erlang
#{dirs => ["src"],
filter => "*.erl",
ruleset => erl_files,
ignore => [module1, module4]
}
```

With this configuration, none of the checks for [erl_files](https://github.com/inaka/elvis_core/blob/master/src/elvis_rulesets.erl#L6-L34) would be applied to `module1.erl` and `module4.erl` files.

### Formating
Expand All @@ -188,7 +193,7 @@ You can also `ignore` modules at a _check level_ or at a _ruleset (group of chec
`plain` and `parsable`. The latter could be use for the automated parsing and has a
format very close to dialyzer in a form `FILE:LINE:RULE:MESSAGE`:

```
```erlang
src/example.erl:1:god_modules:This module has too many functions (56). Consider breaking it into a number of modules.
src/example_a.erl:341:no_debug_call:Remove the debug call to io:format/2 on line 341.
src/example_a.erl:511:used_ignored_variable:Ignored variable is being used on line 511 and column 54.
Expand Down

0 comments on commit 65f3ef4

Please sign in to comment.