Comments (6)
Hi, @cdyb-kivra. Thanks for the report.
I'm not sure what "using the git-branch subcommand to elvis" means 😕, though.
In any case, when the warning is issued, is it correct? (i.e. are the folders empty or non-existing?)
It was, indeed, not a concern of mine when developing it to assume different behaviours using branches, but I can revisit that.
Since it's a warning, and not an error (we did discussed it being an error, but didn't go that route) what would you suggest we do differently?
from elvis_core.
The git-branch subcommand is used to only run elvis on those files that have been changed compared to a given git branch. So, for example, my elvis.config
points at three directories, src
, test
and include
. Most of the time I work on a feature branch and change files in src
and test
. I then run the elvis git-branch
command to get it to check only those files I have actually edited (compared to our main branch). With the latest elvis version, I then always get a warning about there being no files in include
and that I should update my configuration. Which is not true. Since it's a warning, it's not really a problem, but it is annoying and it teaches to ignore warnings from elvis.
I haven't looked at how this is implemented, but offhand it feels like the check that triggers the warning should be applied before the git-branch filtering is done. Or, possibly, that the warning should just be suppressed entirely when the git-branch subcommand is running.
from elvis_core.
it is annoying and it teaches to ignore warnings from elvis
I agree it's no good.
I didn't know about elvis git-branch
. I use elvis
only as a plug-in, which is why I didn't consider that "edge" case.
I'm pulling @elbrujohalcon to this issue, since this'll probably also include changes to elvis
.
I haven't looked at how this is implemented, but offhand it feels like the check that triggers the warning should be applied before the git-branch filtering is done. Or, possibly, that the warning should just be suppressed entirely when the git-branch subcommand is running.
This is the bit that seems to need some kind of tweaking in the code. elvis
is "aware" of elvis_core
but not the other way around, though they should play nice.
from elvis_core.
It's been ages since I last saw git-branch
anywhere. I think that, instead of myself, you should pull @jfacorro here, @paulo-ferraz-oliveira.
Sorry, but I can help as much or even less than you on this topic.
from elvis_core.
At the company I work for (Kivra), we use elvis git-branch
as part of our CI/CD pipeline. So it's not just me personally :-)
from elvis_core.
Sure. Let's wait for @jfacorro's input, then. We either have to silence elvis_core via an API variable, an option or, ... another thing (?)
from elvis_core.
Related Issues (20)
- Unused Variable Names HOT 5
- no_match_in_condition reports a warning even when the condition includes a valid match
- Bug (?) in atom_naming_convention HOT 2
- Using ets:fun2ms without including ms_transform.hrl should be an error HOT 3
- New ruleset `gitignore`
- Propose `gen_server` et all "no-timeout" functions as `no_common_caveats`?
- Have a simple way to run `all` checks (even optional ones) HOT 8
- New rule: consistent file names HOT 2
- New Rule: No Import Type
- New Rule: Unsafe usage of application HOT 1
- Wildcards in no_call_functions MFA HOT 4
- Potential new rule: only call internal_export'ed functions from test code HOT 2
- No consecutive strings
- Rule: Do not use lists on start_link/3,4 and init/1 HOT 3
- no_successive_maps obsolete due to Erlang change?
- New rule: consistent deps applications HOT 3
- max_function_length counts multiple function clauses as a single function HOT 2
- Count `_to_atom` as common caveats? HOT 2
- Should `no_macros` consider `LOG_...` as allowed? HOT 3
- no_successive_maps doesn't work when nested
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elvis_core.