Giter Club home page Giter Club logo

Comments (18)

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

From @AbdealiJK on February 21, 2016 8:42

@aayn

  • {filename} - used in every bear. Examples: AlexBear and ProseLintBear. 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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

From @aayn on February 21, 2016 9:41

@AbdealiJK So, I went through a few bears, and here are my next set of questions:

  1. I saw that arguments = "{filename}" is used in 4 bears(not all). What exactly is this class variable achieving? Does the {} around filename have some significance or just for formatting?
  2. From what I read through in Lint.py, if a bear, not just finds issues, but also can suggest corrections , then gives_corrected is set to True. But, where does it find such corrections?

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

From @AbdealiJK on February 21, 2016 9:46

@aayn

  1. 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'sstr.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++ ?)
  2. Some linters provide a fixed version of the file. We take that, find "diffs" (like git diffdoes) and find out which parts of the file are changed. We use these changed blobs to suggest corrections.

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

From @aayn on February 21, 2016 10:56

@AbdealiJK Oh. I didn't think of that. Okay

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

@aayn still working on this? :)

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

From @AbdealiJK on March 30, 2016 5:57

@aayn we do use it in JSHintBear now :)

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

i was just checking if you're still around, it's been a while :) good luck on it!

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

From @Makman2 on April 13, 2016 2:37

@aayn ping

from documentation.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

"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.

Adrianzatreanu avatar Adrianzatreanu commented on June 28, 2024

lack of reponse => unassigning for now, message us if you would like to work on this when you're coming back :)

from documentation.

Makman2 avatar Makman2 commented on June 28, 2024

Lint is deprecated and Linter_Bears.rst already covers the new @linter decorator.

from documentation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.