Commit graph

813 commits

Author SHA1 Message Date
Vitalii Elenhaupt
7b8316f061
Bump v1.5.0 2023-07-28 22:40:22 +03:00
Vitalii Elenhaupt
8ef588dc6d
Merge pull request #393 from stufro/362-raise-on-invalid-config-file-path
Raise error when passed invalid config file path
2023-07-26 17:19:44 +03:00
Stuart Frost
88e0437902 Move fixture file to spec/fixtures directory 2023-07-25 10:00:16 +01:00
Stuart Frost
4741c9f4c4 Reword generic error message on config load 2023-07-25 08:46:13 +01:00
Stuart Frost
d9b2d69055 Reword error when file doesn't exist
Applied suggestion from PR

Co-authored-by: Vitalii Elenhaupt <3624712+veelenga@users.noreply.github.com>
2023-07-25 08:43:49 +01:00
Stuart Frost
5f878fb40f Move missing config file check into Ameba::Config 2023-07-24 19:10:52 +01:00
Stuart Frost
01a943d0d6 Raise error when passed invalid config file path 2023-07-24 15:30:38 +01:00
Sijawusz Pur Rahnama
8c9d234d0b
Merge pull request #391 from straight-shoota/feat/portability
Make postinstall portable
2023-07-16 20:42:37 +02:00
Johannes Müller
efa9c9dba0
Makefile: Remove run_file target 2023-07-15 22:47:14 +02:00
Johannes Müller
15ce5437d1
Make postinstall portable
Using `shards build` directly instead of `make build` improves portability a lot.
This should basically "just work" almost anywhere (including Windows). No need for `make` to be available and makefile compatibility doesn't matter either.
2023-07-15 10:13:53 +02:00
Johannes Müller
eacb9308a7
Utilize shards' executables
There's no need for copying the executables manually (which happens in both makefile targets `bin` and `run_file`).
Shards' `executables` takes care of that.

The makefile targets could potentially be dropped as well, I don't think there would be other uses case for those.
2023-07-15 10:13:53 +02:00
Sijawusz Pur Rahnama
a33f98624a
Merge pull request #376 from crystal-ameba/update-to-work-with-crystal-nightly 2023-07-11 23:50:14 +02:00
Sijawusz Pur Rahnama
33c8273866
Merge pull request #387 from crystal-ameba/feature/minmax-after-map-rule
Add `Performance/MinMaxAfterMap` rule
2023-07-10 16:17:53 +02:00
Sijawusz Pur Rahnama
327ed546b9
Apply suggestions from code review
Co-authored-by: Vitalii Elenhaupt <3624712+veelenga@users.noreply.github.com>
2023-07-10 16:09:01 +02:00
Sijawusz Pur Rahnama
ddff8d226b Add Performance/MinMaxAfterMap rule 2023-07-10 15:46:17 +02:00
Sijawusz Pur Rahnama
5cff76071a No need for such micro-optimizations, LLVM takes care of those 2023-07-02 14:34:25 +02:00
Sijawusz Pur Rahnama
29e29b8e1d Fix Performance/ExcessiveAllocations to exclude each calls without a block 2023-06-30 21:44:47 +02:00
Sijawusz Pur Rahnama
21051acfff
Merge pull request #386 from crystal-ameba/fix-issue-385 2023-06-30 20:58:56 +02:00
Sijawusz Pur Rahnama
abe5237802 Add Performance/ExcessiveAllocations rule 2023-06-30 15:17:40 +02:00
Sijawusz Pur Rahnama
b7b21ffeb0
Merge pull request #384 from crystal-ameba/fix-issue-383
Fix `Style/VerboseBlock` rule to work with binary operations
2023-06-29 10:20:13 +02:00
Sijawusz Pur Rahnama
4d0125a0f3 Fix Style/VerboseBlock rule to work with binary operations 2023-06-29 08:15:39 +02:00
Sijawusz Pur Rahnama
e1f5c81804
Merge pull request #379 from crystal-ameba/several-tweaks-and-refactors
Several tweaks and refactors
2023-06-14 16:54:27 +02:00
Sijawusz Pur Rahnama
16141a376e Cleanup properties definition macro 2023-06-14 15:08:19 +02:00
Sijawusz Pur Rahnama
596b0dd9d0 Misc tweaks and refactors 2023-06-14 15:06:24 +02:00
Sijawusz Pur Rahnama
b4244d4c61
Merge pull request #378 from crystal-ameba/node-visitor-category 2023-06-13 11:36:05 +02:00
Sijawusz Pur Rahnama
1931a5f4ef Make skip a named argument 2023-06-12 23:17:14 +02:00
Sijawusz Pur Rahnama
c09b36799a Make AST::NodeVisitor::Category a flag enum 2023-06-12 23:17:14 +02:00
Sijawusz Pur Rahnama
38b6751bc0 Add AST::NodeVisitor::Category simplifying code a bit 2023-06-12 23:17:14 +02:00
Sijawusz Pur Rahnama
db59b23f9b Fix specs against Crystal nightly 2023-06-10 01:11:21 +02:00
Sijawusz Pur Rahnama
9a8538aa69
Update README.md 2023-06-09 09:57:26 +02:00
Sijawusz Pur Rahnama
aceb054aa0
Merge pull request #374 from crystal-ameba/lint-documentation-rule
Add `Lint/Documentation` rule
2023-06-08 14:10:21 +02:00
Sijawusz Pur Rahnama
b156a6a6a1 Add comments to macros 2023-06-08 14:03:35 +02:00
Sijawusz Pur Rahnama
94e31d4685 Do the same in NodeVisitor 2023-06-08 04:28:37 +02:00
Sijawusz Pur Rahnama
e12d72cc88 Set the ASTNode#visibility as well 2023-06-08 04:28:17 +02:00
Sijawusz Pur Rahnama
262e31c35b Cleanup README mention (MT is enabled by default) 2023-06-08 02:26:39 +02:00
Sijawusz Pur Rahnama
c9d25f3409 Do not run disabled rules against the codebase 2023-06-08 02:24:12 +02:00
Sijawusz Pur Rahnama
7caa47fb6a Several small refactors 2023-06-08 02:04:30 +02:00
Sijawusz Pur Rahnama
4d8346509e Implement Documentation rule on top of the ScopeVisitor 2023-06-08 02:04:06 +02:00
Sijawusz Pur Rahnama
4c740f394a Implement Scope#visibility 2023-06-08 01:58:58 +02:00
Sijawusz Pur Rahnama
85c3db4d74 Move NODES constant into its proper namespace 2023-05-31 13:15:01 +02:00
Sijawusz Pur Rahnama
6e5a9a60b3 Refactor Lint::Documentation and ignore macro hooks 2023-05-29 17:09:39 +02:00
Sijawusz Pur Rahnama
09fdac6be9 Refactor Lint::Documentation rule to use a custom visitor 2023-05-29 16:33:45 +02:00
Sijawusz Pur Rahnama
1a9a58b3cd Add Lint/Documentation rule 2023-05-29 16:32:51 +02:00
Sijawusz Pur Rahnama
60948fffd0
Merge pull request #373 from crystal-ameba/fix-372
Raise when empty severity provided to `SeverityYamlConverter.from_yaml`
2023-05-09 14:28:17 +02:00
Sijawusz Pur Rahnama
d0d8b18c83
Raise when empty severity provided to SeverityYamlConverter.from_yaml 2023-05-09 13:02:10 +02:00
Sijawusz Pur Rahnama
14f6ba0c0b
Merge pull request #323 from crystal-ameba/Sija/lint-not-nil-after-no-bang-reports-rindex-calls
Make `Lint/NotNilAfterNoBang` report calls to `#rindex`
2023-05-01 11:16:42 +02:00
Vitalii Elenhaupt
149080ae16
Merge pull request #369 from daliborfilus/fix-crystal-1.8-pcre2-docker-build
Update Dockerfile for Crystal 1.8 + check if binary works
2023-04-24 09:46:09 +03:00
Dalibor Filus
454a747a68
Update Dockerfile for Crystal 1.8 + check if binary works
Crystal 1.8.0+ require pcre2.

Let's also add `RUN ameba -v` to check if the binary actually works.
Fixes cases like this:

```shell
$ docker run --rm -ti ameba:latest sh
Error loading shared library libpcre2-8.so.0: No such file or directory (needed by /usr/bin/ameba)
Error relocating /usr/bin/ameba: pcre2_get_ovector_count_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_config_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_get_ovector_pointer_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_match_data_create_from_pattern_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_jit_stack_assign_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_code_free_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_match_context_create_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_jit_compile_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_compile_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_get_error_message_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_jit_stack_create_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_match_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_match_data_free_8: symbol not found
Error relocating /usr/bin/ameba: pcre2_pattern_info_8: symbol not found
```
2023-04-22 11:41:49 +02:00
Vitalii Elenhaupt
ef2d05e48a
Merge pull request #366 from straight-shoota/fix/severity-spec-yaml-converter
Fix severity type for YAML converter spec
2023-04-05 17:35:19 +03:00
Johannes Müller
c7f2cba409
Fix severity type for YAML converter spec 2023-04-05 11:20:44 +02:00