Comments (18)
From @aayn on February 20, 2016 16:56
@sils1297 In the the tutorial, {filename}
would correspond to html_lint.py
, correct? If yes, then, what exactly should I cover about it?
And, could you please show/point me to an example of the use of the three. I didn't exactly understand what is it that you want me to cover.
from documentation.
From @AbdealiJK on February 21, 2016 8:42
{filename}
- used in every bear. Examples:AlexBear
andProseLintBear
. The documentation doesn't mention{filename}
it was written before that existed- config file generation - we're not using this yet. It's meant to be like if a linter needs a config file, we generate it for them using out
.coafile
's settings and pass it to the linter. (You can take a look at LintTest` to see how it works maybe ?) gives_correction
- GoImportsBear, GoReturnsBear
FYI:
Next time you want to find all bears using something, just do something like git grep "gives_corrected"
and it will show you every place where gives_corrected
is being used.
from documentation.
From @aayn on February 21, 2016 9:41
@AbdealiJK So, I went through a few bears, and here are my next set of questions:
- I saw that
arguments = "{filename}"
is used in 4 bears(not all). What exactly is this class variable achieving? Does the{}
aroundfilename
have some significance or just for formatting? - From what I read through in
Lint.py
, if a bear, not just finds issues, but also can suggest corrections , thengives_corrected
is set toTrue
. But, where does it find such corrections?
from documentation.
From @AbdealiJK on February 21, 2016 9:46
- You may want to do a broader search for
{filename}
as its frequently used as+= " {filename}" and so on. The
{filename}is used by python's
str.format()function and replaced by the appropriate filename -
{}is requires as
.format()only touches these parts of the string and replaces (Sort of like
%s` in C/C++ ?) - Some linters provide a fixed version of the file. We take that, find "diffs" (like
git diff
does) and find out which parts of the file are changed. We use these changed blobs to suggest corrections.
from documentation.
From @aayn on February 21, 2016 10:28
@AbdealiJK
For the first bullet(i.e. {filename}
), here's the summary of what I've understood:
{filename}
and some other things are passed into the arguments
class variable(which is a string). Then, this along with the executable
class variable, is formatted into a command(in Lint
) which is then run using Shell.run_shell_command
.
This^ brings me to my next question: Why does "{filename}
" have to be added as a class variable of every subclass(of Lint
)? Won't it be better if we do it in the Lint
class itself?
from documentation.
From @AbdealiJK on February 21, 2016 10:31
@aayn we used to do it in Lint
- We used to just append it to the command. but the problem is thats not always correct.
lintr
(the RLintBear) needs the filename in a specific place. - RScript "library(lintr); lintr(\"{filename}\");"
or something. In such cases we do not know where to put the filename. hence it's better to let the LinterBear using Lint do it (its not much work)
from documentation.
From @aayn on February 21, 2016 10:33
@AbdealiJK Oh OK. Understood. Thanks :). Is it okay if I do the first bullet in one PR and the rest in another? I've never done documentation before.
from documentation.
From @AbdealiJK on February 21, 2016 10:53
Why not just make the first one in a commit and add more commits to the PR after that ?
from documentation.
From @aayn on February 21, 2016 10:56
@AbdealiJK Oh. I didn't think of that. Okay
from documentation.
@aayn still working on this? :)
from documentation.
From @aayn on March 30, 2016 5:56
@Adrianzatreanu I really want to, I do. But right now, I have truckloads of work :(.
I've completed the first and the third bullet. For the second one, are we using config files for linters yet?
from documentation.
From @AbdealiJK on March 30, 2016 5:57
@aayn we do use it in JSHintBear now :)
from documentation.
From @aayn on March 30, 2016 6:5
If we are in a hurry for the config file tutorial, then it would be better if someone else was assigned. If not, I can do it as soon as my assignments/projects are completed.
from documentation.
i was just checking if you're still around, it's been a while :) good luck on it!
from documentation.
From @Makman2 on April 13, 2016 2:37
@aayn ping
from documentation.
"testing out the new cool reply template"
Hi,
do you need help figuring this out? We're all happy to help you on our gitter channel, just drop by and ask us anything :)
from documentation.
lack of reponse => unassigning for now, message us if you would like to work on this when you're coming back :)
from documentation.
Lint
is deprecated and Linter_Bears.rst
already covers the new @linter
decorator.
from documentation.
Related Issues (20)
- Replace FAQ item about pull requests HOT 1
- Getting in Touch: Add CoC HOT 6
- FAQ: Add item about CoC HOT 1
- Use system_coafile instead of default_coafile in docs
- Add coala as hg hook
- Fix Grammar HOT 7
- Add slashes
- Fix typo HOT 4
- Doc improvement - using coala with pre-commit
- Tutorial.rst: Correct grammatical error HOT 6
- FAQ.rst: Information about one test is missing HOT 6
- Update sample travis.yml HOT 1
- update year in footer. HOT 11
- Improvement in the Installation guide ( Docker Part ) HOT 2
- FAQ.rst: Two of the tests need to be changed. HOT 10
- Improvements in the README.rst HOT 3
- Fix external links which point to internal pages HOT 4
- Add documentation on how to write configuration in TOML
- Add pipx installation method
- Typos across Documentation 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 documentation.