Comments (8)
First let me thank you for taking the time to put this together. Using STDIN for this is certainly something useful.
so certain editors can annotate the original file
Which editors are these? I am asking because the hack in the PR to make this work is really something I would like to avoid.
from credo.
An example of Spacemacs using it with Flycheck and realtime updating :
from credo.
Just to be clear, which hack are you referring to, the one that prefixes the filename stub ?
from credo.
Maybe "hack" was a bit harsh. Sorry, it was late and was a bit grumpy. ๐
To clarify, please take a look at this branch, where I merged your commits and made some changes to better fit the "bigger picture":
- The hack I was reffering to was setting the
files
field in the Config struct during CLI parameter parsing. The module responsible for converting the parameters to source file locations isCredo.Sources
. Separating these concerns makes it easier to reason about the system as a whole. - Setting the source files in the Suggest command via a new function
get_source_files
violated this. And we have 3 commands (suggest
,list
andexplain
) that need to be able to get sources from STDIN. - As a general guideline: When contributing to a project, always try to adhere to already present styles, formatting rules etc. This makes it much liklier that a PR gets merged, since the original author does not "trip over" cosmetic inconsistencies when reviewing changes to actual functionality.
That said, I personally hate it when people are super nitpicky about PRs and ask you to modify white-space or other trivial parts of your commits. Therefore I merged the changes into the above mentioned branch and will merge that integration branch into master soon!
Your input to this project was already very valuable and I sincerely hope that the above "lecture" does not stop you from contributing more ๐
from credo.
No worries :D
yeah, I agree it was a bit invasive to set the files option like that but had no other idea at the moment on how to accomplish it otherwise.
I really like the way you handle this. There are indeed a lot of people that are very picky about their pull requests which, at least for me, takes away all the enthusiasm and excitement to help with those projects.
For me personally a pull request is more a prove of concept. I've had an idea which might be really useful for others as well which i'll try to incorporate as best as i can with the limited knowledge of the existing code base, but when you are new to a piece of code, you have no idea what the details are. In that case i'll try to prove my solution and how it works as best as i can. For the maintainer it should be quite clear what the proposed suggestion and result should be, but as he/she does have a mental map of the original code base, its blatantly clear that the new code is invasive and can be handled in a much nicer way. With the given information he/she should be able to quickly refactor it and incorporate the new functionality, as you did :)
In the end, all that matters to me, is that the intended behaviour is adopted and working, not necessarily by using my code verbatim :)
I just started out with Elixir about 3 months ago and switched to Spacemacs about two weeks ago. The switching to Spacemacs (and with it, coincidentally, evil-mode, which i should have done like 20 years ago...but thats besides the point) opens up a lot of new experiences and opportunities to spot missing behaviour or tools and lear about new ones. This prompted me to try and incorporate Credo into Flycheck :)
Anyways,
I'll be around and keep an eye on the issue tracker to see if i can help in any way :)
Have a wonderful day !
Gerard.
from credo.
Hi Gerard,
your changes are part of the latest release - v0.3.6
.
Please check if the "STDIN feature" now works to your content. Please also take note that the CLI switch was renamed to --read-from-stdin
which is a notch more descriptive.
btw: are you by any chance attending this year's ElixirConf.EU?
from credo.
Hi,
Great to hear , will let you know if it works.
Regarding elixir conf, would have loved to, but a day later is WGT festival in Leipzig. This is something I always look forward to and have been going there every year since the last 15 years :) (http://www.wave-gotik-treffen.de/english/bands.php).
Let me know if you are ever in NL though so we can catch some beers :)
On 11 Mar 2016, at 23:08, Renรฉ Fรถhring [email protected] wrote:
Hi Gerard,
your changes are part of the latest release - v0.3.6.
Please check if the "STDIN feature" now works to your content. Please also take note that the CLI switch was renamed to --read-from-stdin which is a notch more descriptive.
btw: are you by any chance attending this year's ElixirConf.EU?
โ
Reply to this email directly or view it on GitHub.
from credo.
Sorry for the late reply :/
I tested it out and everything seems to work perfectly :)
Thank you so much :)
Gerard.
from credo.
Related Issues (20)
- MissedMetadataKeyInLoggerConfig is incorrect HOT 5
- Fails to running mix credo diff HOT 7
- `There should be no more than 1 consecutive blank lines.` should not trigger for string data HOT 4
- Invalid warnings on typespecs with bitstrings HOT 3
- `No files found` (OTP 26? MacOS?) HOT 5
- Consider including CHANGELOG.md in the package? HOT 4
- Different output when running credo with the `--read-from-stdin` option HOT 4
- Question: Is it possible to define a .credo.exs in a dependency with custom checks and apply it when running mix credo in a project HOT 3
- Predicate function names check does not work for non-zero arity functions HOT 2
- Add list of standard checks to docs HOT 2
- Credo.Check.Warning.Dbg does not detect `dbg` HOT 8
- #FIXME fails silently HOT 6
- Credo wrongly reports about macro name HOT 2
- Credo.Check.Warning.MissedMetadataKeyInLoggerConfig reporting false errors since 1.7.2 upgrade HOT 8
- Elixir version check fails with Credo.Check.Warning.LazyLogging HOT 1
- Credo warning /test/add_credo_plugin_to_project.exs:121:6 HOT 2
- Code readability: Predicate function names should not start with 'is', and should end in a question mark. HOT 1
- Command line switch `--read-from-stdin` doesn't respect config files HOT 4
- Predicate callbacks from behavior are not ignored HOT 2
- Issue with Unused variables confused about the strategy HOT 1
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 credo.