Skip to content

Commit

Permalink
Merge pull request #132 from inaka/igaray.121.break_the_cycle
Browse files Browse the repository at this point in the history
[Closes #121] Moved ktn_code and ktn_meta_SUITE to their own repos
  • Loading branch information
Brujo Benavides committed Feb 24, 2016
2 parents 2d14a58 + 5dd6a99 commit a8aa983
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 1,052 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
PROJECT = katana

DEPS = inaka_aleppo xref_runner elvis_core
DEPS = xref_runner
TEST_DEPS = mixer
SHELL_DEPS = sync
BUILD_DEPS = inaka_mk hexer_mk
LOCAL_DEPS = xmerl tools compiler syntax_tools common_test inets ssl test_server hipe public_key dialyzer wx

# Prevents erlang.mk from downloading elvis_core's katana dependency
IGNORE_DEPS += katana

dep_inaka_aleppo = hex 0.9.9
dep_xref_runner = hex 0.2.4
dep_mixer = git https://github.com/inaka/mixer.git 0.1.4
dep_elvis_core = git https://github.com/inaka/elvis_core.git efa6df5
dep_sync = git https://github.com/rustyio/sync.git 9c78e7b
dep_inaka_mk = git https://github.com/inaka/inaka.mk.git 1.0.0
dep_hexer_mk = git https://github.com/inaka/hexer.mk.git 1.0.1
dep_hexer_mk = git https://github.com/inaka/hexer.mk.git 1.1.0

DEP_PLUGINS = inaka_mk hexer_mk

Expand Down
48 changes: 2 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
erlang katana
======

![samuari](https://raw.githubusercontent.com/unbalancedparentheses/katana/master/images/samurai.jpg)
![samurai](https://raw.githubusercontent.com/unbalancedparentheses/katana/master/images/samurai.jpg)

Even if you love Erlang as we do, from time to time you might ask yourself why
some functions you normally find in other languages are not part of the erlang's
Expand All @@ -17,7 +17,7 @@ To sum up this is a grab bag of useful functions (ideally).
# Contact Us

For **questions** or **general comments** regarding the use of this library,
please use our public [hipchat room](https://www.hipchat.com/gpBpW3SsT).
please use our public [hipchat room](https://inaka.net/hipchat).

If you find any **bugs** or have a **problem** while using this library, please
[open an issue](https://github.com/inaka/erlang-katana/issues/new) in this repo
Expand Down Expand Up @@ -115,50 +115,6 @@ Possible error values for the body assert are:
- {error, {nomatch, Pattern, Body}} if the body does not match the regex.
- {nomatch, ResBody, Body}} if the body does not match the text.

### `ktn_meta_SUITE`

#### Goals
The **meta** suite lets you check your code with `dialyzer`, `xref` and `elvis`.

#### Usage
To include the suite in your project, you only need to invoke its functions from a common_test suite. If you use [mixer](https://github.com/inaka/mixer) you can just do…

```erlang
-module(your_meta_SUITE).

-include_lib("mixer/include/mixer.hrl").
-mixin([ktn_meta_SUITE]).

-export([init_per_suite/1]).

init_per_suite(Config) -> [{application, your_app} | Config].
```

Of course, you can choose what functions to include, for example if you want `dialyzer` but not `elvis` nor `xref` you can do…

```erlang
-mixin([{ ktn_meta_SUITE
, [ dialyzer/1
]
}]).

-export([all/0]).

all() -> [dialyzer].
```

#### Configuration
`ktn_meta_SUITE` uses the following configuration parameters that you can add to the common_test config for your test suite:

| Parameter | Description | Default |
|-----------|-------------|---------|
| `base_dir` | The base_dir for your app | `code:lib_dir(App)` where `App` is what you define in `application` below |
| `application` | The name of your app | **no default** |
| `dialyzer_warnings` | The active warnings for _diaylzer_ | `[error_handling, race_conditions, unmatched_returns]` |
| `plts` | The list of plt files for _dialyzer_ | `filelib:wildcard("your_app/*.plt")` |
| `elvis_config` | Config file for _elvis_ | `"your_app/elvis.config"` |
| `xref_config` | Config options for _xref_ | `#{dirs => [filename:join(BaseDir, "ebin"), filename:join(BaseDir, "test")], xref_defaults => [{verbose, true}, {recurse, true}, {builtins, true}]}` |
| `xref_checks` | List of checks for _xref_ | `[ undefined_function_calls, locals_not_used, deprecated_function_calls]` |

### `ktn_recipe`

Expand Down
Loading

0 comments on commit a8aa983

Please sign in to comment.