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)
- Predicate callbacks from behavior are not ignored HOT 2
- Issue with Unused variables confused about the strategy HOT 1
- missing spec on unquoted function raise error HOT 3
- Credo.Check.Warning.WrongTestFileExtension displayed in non-test module in v1.7.4 HOT 8
- NoAmbiguousAliases fails on function param with name alias HOT 3
- "Most of the time you are using the multi-alias/require/import/use syntax..." with compile_env HOT 4
- Gracefully handle output of bitstring `:message` in `%Credo.Issue{}` HOT 8
- False positive: spec in quoted HOT 3
- False Positive: Macro sigils with uppercase words HOT 4
- `UnusedKeywordOperation` check should ignore `Keyword.validate!/2` HOT 4
- Arguable advice from `Credo.Check.Refactor.AppendSingleItem` HOT 1
- Predicate function names should not start with 'is', and should end in a question mark flagged for :ets.whereis HOT 2
- Not ready for Elixir 1.16: a lot of 'warning: negative steps are not supported in Enum.slice/2 HOT 1
- Elixir 1.17 issues HOT 7
- Dependency divergence on compile HOT 2
- Unicode characters (arrows) that indicate priority of found issues not printed correctly HOT 2
- Credo.Check.Warning.Dbg: doesn't warn when using `&dbg/1`
- Error `mix credo` on Elixir 1.17 and Erlang/OTP 27 HOT 4
- Credo.Check.Design.SkipTestWithoutComment and many others, fail to run (Elixir 1.17 issue?) HOT 1
- Error upgrading project to Elixir 1.17 HOT 3
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.