Closed dinkopehar closed 1 year ago
Hey. Thanks for the heads up.
I don't think it is possible to run this action locally. The doc is outdated, i will remove those instructions.
To be able to test locally you need to use the same Ameba version as your GitHub action uses.
Also is there any .ameba.yml
configuration in the repo?
Yes, at the root of the project there is .ameba.yml
containing:
Metrics/CyclomaticComplexity:
Description: Disallows methods with a cyclomatic complexity higher than `MaxComplexity`
Enabled: false
The ameba version is 0.14.3
Is the UselessAssign correctly detected by the action or is it false positives?
This is the output of container when it's run:
So I don't see nothing executed, but the UselessAssign
isn't detected.
Sorry, i didn't get what is the problem. Does github action miss the introduced on purpose fail?
Yes, that's the problem.
Hey, anyone actually able to get this to run? What's the state of this? Appears to be failing to detect "introduced on purpose fails".
I was not able to reproduce this on my end. @greenbigfrog do you have an open-sourced example of the failure?
From the README.md:
Build the docker image:
But it fails with stack trace:
Any way to run this locally ? I'm contributing to closed source project written in Crystal and using this action in GitHub on pull request, it passed the checks while running ameba locally as dependency, it failed (on purpose introduced fail):
EDIT:
Also, this is ameba jobs in our workflow: