Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW]: lintr: Static Code Analysis for R #7240

Open
editorialbot opened this issue Sep 16, 2024 · 37 comments
Open

[REVIEW]: lintr: Static Code Analysis for R #7240

editorialbot opened this issue Sep 16, 2024 · 37 comments
Assignees
Labels
review Track: 5 (DSAIS) Data Science, Artificial Intelligence, and Machine Learning

Comments

@editorialbot
Copy link
Collaborator

editorialbot commented Sep 16, 2024

Submitting author: @jimhester (James Hester)
Repository: https://github.com/r-lib/lintr
Branch with paper.md (empty if default branch):
Version: v3.1.2
Editor: @lrnv
Reviewers: @JosiahParry, @SaranjeetKaur
Archive: Pending

Status

status

Status badge code:

HTML: <a href="https://joss.theoj.org/papers/0f4eccbd59ee5bf5a5be88489581970f"><img src="https://joss.theoj.org/papers/0f4eccbd59ee5bf5a5be88489581970f/status.svg"></a>
Markdown: [![status](https://joss.theoj.org/papers/0f4eccbd59ee5bf5a5be88489581970f/status.svg)](https://joss.theoj.org/papers/0f4eccbd59ee5bf5a5be88489581970f)

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@JosiahParry & @SaranjeetKaur, your review will be checklist based. Each of you will have a separate checklist that you should update when carrying out your review.
First of all you need to run this command in a separate comment to create the checklist:

@editorialbot generate my checklist

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @lrnv know.

Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest

Checklists

📝 Checklist for @JosiahParry

📝 Checklist for @SaranjeetKaur

@editorialbot editorialbot added review Track: 5 (DSAIS) Data Science, Artificial Intelligence, and Machine Learning labels Sep 16, 2024
@editorialbot
Copy link
Collaborator Author

Hello humans, I'm @editorialbot, a robot that can help you with some common editorial tasks.

For a list of things I can do to help you, just type:

@editorialbot commands

For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

✅ OK DOIs

- 10.21105/joss.01686 is OK

🟡 SKIP DOIs

- No DOI given, and none found for title: The Tidyverse Style Guide
- No DOI given, and none found for title: R: A Language and Environment for Statistical Comp...
- No DOI given, and none found for title: Code Complete
- No DOI given, and none found for title: Static program analysis — Wikipedia, The Free Ency...

❌ MISSING DOIs

- None

❌ INVALID DOIs

- None

@editorialbot
Copy link
Collaborator Author

Software report:

github.com/AlDanial/cloc v 1.90  T=0.15 s (2445.7 files/s, 308678.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
R                              333           4204           8314          28584
XML                              2              0            129           1797
Markdown                        10            360              0           1469
YAML                            13             83             53            433
Rmd                             10            372            881            200
CSV                              1              0              0            124
JSON                             2              0              0             61
vim script                       1             14             21             50
TeX                              1              4              0             37
Dockerfile                       1              3              0             11
-------------------------------------------------------------------------------
SUM:                           374           5040           9398          32766
-------------------------------------------------------------------------------

Commit count by author:

   583	Michael Chirico
   381	Jim Hester
   214	Indrajeet Patil
   155	AshesITR
    88	Alexander Rosenstock
    57	Florent Angly
    46	Kun Ren
    24	Russ Hyde
    13	Kirill Müller
    10	Dragoș Moldovan-Grünfeld
     8	Forest Fang
     8	Hugo Gruson
     8	dependabot[bot]
     7	Gábor Csárdi
     7	MEO265
     7	Michael Quinn
     7	Russell Hyde
     6	Barret Schloerke
     5	Salim B
     4	JhossePaul
     4	Jonathan Keane
     4	jrnold
     3	Bruce Lee
     3	Daniel Possenriede
     3	Fabian Scheipl
     3	Jennifer (Jenny) Bryan
     3	Konrad Pagacz
     3	Laurent Gatto
     3	eitsupi
     3	huisman
     3	nathaneastwood
     3	olivroy
     2	Alex Branham
     2	Ashley Baldry
     2	Chris Black
     2	Dan Kessler
     2	F-Noelle
     2	Iñaki Úcar
     2	Jack Wasey
     2	Konrad Rudolph
     2	Maëlle Salmon
     2	Micah J Waldstein
     2	Rafael Zayas
     2	dmurdoch
     1	Alessandro Gentilini
     1	Alexis Iglauer
     1	Andrew Choi
     1	Andrés Felipe Quintero Moreano
     1	Anton Bossenbroek
     1	Bernie Gray
     1	Brandon Bertelsen
     1	Christian Diener
     1	Colin Rundel
     1	Daniel Sabanes Bove
     1	Dave Lovell
     1	Derek Chiu
     1	Dragos Moldovan-Grunfeld
     1	Ellis Valentiner
     1	Fleur Kelpin
     1	Florian Kohrt
     1	Frans van Dunné
     1	Frédéric Mahé
     1	Gabor Csardi
     1	Gabriela de Queiroz
     1	Guillaume Gaullier
     1	Hadley Wickham
     1	Hannah Frick
     1	Hao Ye
     1	Hedley
     1	Henning Lorenzen
     1	Hiroaki Yutani
     1	JJ Allaire
     1	James Baird
     1	Jamie Owen
     1	Jeffrey Arnold
     1	Jenny Bryan
     1	Jeremy Werner
     1	Jon Harmon
     1	Josh
     1	Kara Woo
     1	Landon Abney
     1	Leonardo Gama
     1	Mara Averick
     1	Marcel Schilling
     1	Marie-Helene Burle
     1	Mark Miller
     1	Matt Brennan
     1	Matthew T. Warkentin
     1	Nic
     1	Nicholas Masel
     1	Paolo Di Lorenzo
     1	Paul Kaefer
     1	Paul Staab
     1	Randy Lai
     1	Shaopeng
     1	StefanBRas
     1	Stu Field
     1	The Gitter Badger
     1	Tony Kenny
     1	Wesley Burr
     1	Will Landau
     1	Yu ISHIKAWA
     1	Yuu ISHIKAWA
     1	arekbee
     1	banky
     1	bernie gray
     1	jeffwong-nflx
     1	jmaspons
     1	ttriche

@editorialbot
Copy link
Collaborator Author

Paper file info:

📄 Wordcount for paper.md is 1498

✅ The paper includes a Statement of need section

@editorialbot
Copy link
Collaborator Author

License info:

🟡 License found: Other (Check here for OSI approval)

@lrnv
Copy link

lrnv commented Sep 16, 2024

@JosiahParry, @SaranjeetKaur greetings! Thanks for accepting to take a bit of time to review this submission. First, do you know how JOSS review are handled, or do you need me to wrap it up for you ? The first thing you have to do is to generate a guide for you -- formatted as a checklist --, using a command @editorialbot generate my checklist. in this discussion. Then if you have more questions, I'll be happy to help

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@JosiahParry
Copy link

JosiahParry commented Sep 16, 2024

Review checklist for @JosiahParry

Conflict of interest

  • I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the https://github.com/r-lib/lintr?
  • License: Does the repository contain a plain-text LICENSE or COPYING file with the contents of an OSI approved software license?
  • Contribution and authorship: Has the submitting author (@jimhester) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support

Software paper

  • Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • A statement of need: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

@JosiahParry
Copy link

The package, documentation, and testing is great. Please address the below regarding the paper. Notably there isn't a clear summary of lintr for a non-specialist audience, nor is there a state of the field section.

Paper

  • Please define what a linter is and what their utility is
  • please make the summary of lintr more explicit than

"The {lintr} package is an open-source R package that provides static code analysis to check for a variety of common problems related to readability, efficiency, consistency, style, etc."

  • Please provide a description of other static code analysis packages—e.g. luke tierneys codetools, Mango's goodpractice, and more recently flint

  • Please provide a description of what a linter is prior discussing some of the 113 provided by {lintr}.

  • Under Efficiency the use of "the users" can remove "the".

- Sometimes the users might not be aware
+ Sometimes users might not be aware

@IndrajeetPatil
Copy link

@editorialbot generate pdf

@editorialbot
Copy link
Collaborator Author

👉📄 Download article proof 📄 View article proof on GitHub 📄 👈

@IndrajeetPatil
Copy link

@JosiahParry Thanks a lot for your feedback! We have updated the draft to address your concerns.
Please let us know if you have any additional feedback!


P.S. We are also currently looking into a possible encoding issue seen in the PDF output:

Screenshot 2024-10-02 at 08 27 11

@lrnv
Copy link

lrnv commented Oct 2, 2024

@IndrajeetPatil Happens sometimes in Julia when some characters are not availiable in the monospace font used. You can change the default monospace font (for one that includes the glyph you need) by adding:

header-includes:
- |
  ```{=latex}
  \setmonofont[Path=./]{MyFont-Regular.ttf}
  ```

to the yaml header of the paper. See openjournals/joss#963 for wide discussions if this does not work.

@lrnv
Copy link

lrnv commented Oct 17, 2024

Hey @SaranjeetKaur have you had time to take a look at this review ?

@SaranjeetKaur
Copy link

Hi @lrnv,
I was on leave, so haven't managed to catch up with it. I have it on my to-do, so will get to it soon.

@JosiahParry
Copy link

This is all good from my side! Good work all! Many years in the making :)

@SaranjeetKaur
Copy link

SaranjeetKaur commented Nov 3, 2024

Review checklist for @SaranjeetKaur

Conflict of interest

  • I confirm that I have read the JOSS conflict of interest (COI) policy and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review.

Code of Conduct

General checks

  • Repository: Is the source code for this software available at the https://github.com/r-lib/lintr?
  • License: Does the repository contain a plain-text LICENSE or COPYING file with the contents of an OSI approved software license?
  • Contribution and authorship: Has the submitting author (@jimhester) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?
  • Substantial scholarly effort: Does this submission meet the scope eligibility described in the JOSS guidelines
  • Data sharing: If the paper contains original data, data are accessible to the reviewers. If the paper contains no original data, please check this item.
  • Reproducibility: If the paper contains original results, results are entirely reproducible by reviewers. If the paper contains no original results, please check this item.
  • Human and animal research: If the paper contains original data research on humans subjects or animals, does it comply with JOSS's human participants research policy and/or animal research policy? If the paper contains no such data, please check this item.

Functionality

  • Installation: Does installation proceed as outlined in the documentation?
  • Functionality: Have the functional claims of the software been confirmed?
  • Performance: If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)

Documentation

  • A statement of need: Do the authors clearly state what problems the software is designed to solve and who the target audience is?
  • Installation instructions: Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.
  • Example usage: Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).
  • Functionality documentation: Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?
  • Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?
  • Community guidelines: Are there clear guidelines for third parties wishing to 1. Contribute to the software 2. Report issues or problems with the software 3. Seek support

Software paper

  • Summary: Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided?
  • A statement of need: Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work?
  • State of the field: Do the authors describe how this software compares to other commonly-used packages?
  • Quality of writing: Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)?
  • References: Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper citation syntax?

@SaranjeetKaur
Copy link

SaranjeetKaur commented Nov 3, 2024

Thanks for all your work! Great package and documentation!

Paper

Naturally, we can’t discuss all of them here. To see details about all available linters, we encourage readers to see https://lintr.r- lib.org/dev/reference/index.html#individual- linters.

This could perhaps be rephrased as (instead of putting a link, it could be a hyperlink?):

To see the most up-to-date details about all the available linters, we encourage readers to refer to the list of individual linters.

@IndrajeetPatil
Copy link

Happy to rephrase that way.

instead of putting a link, it could be a hyperlink?

That's not friendly to readers who like to read the printed versions of publications (me being one of them 😉)

@SaranjeetKaur
Copy link

That's not friendly to readers who like to read the printed versions of publications (me being one of them 😉)

I see, I didn't realise that! Thanks for clarifying!

@SaranjeetKaur
Copy link

SaranjeetKaur commented Nov 3, 2024

Although the "Statement of Need" section is giving the required info, it talks about the tool before mentioning why the tool is required. Perhaps a sentence or two, might help clarify? What do you think?

For example,

In computer programming, "linting" is the process of analysing the source code to identify possible programming and stylistic problems (Refer: https://en.wiktionary.org/wiki/linting). This can be done using a software tool called a linter (or a lint tool). A linter analyzes code to identify potential errors, stylistic issues, or deviations from coding standards. This helps ensure consistency, readability, and best practices by flagging common mistakes, such as syntax errors, unused variables, or improper formatting. Linters are essential for improving code quality, preventing bugs, and maintaining a clean codebase, especially in collaborative development environments (Wikipedia contributors, 2024). {lintr} is an open-source package that provides linters for the R programming language, which is an interpreted, dynamically-typed programming language (R Core Team, 2023), and is used by a wide range of researchers and data scientists. {lintr} can thus act as a valuable tool for R users to help improve the quality and reliability of their code.

@SaranjeetKaur
Copy link

Installing the development version from GitHub (packageVersion("lintr") # ‘3.1.2.9000’) gives length 113:

remotes::install_github("r-lib/lintr")

library(lintr)

length(all_linters())
#> [1] 113

Whereas installing the stable version on CRAN (packageVersion("lintr") # ‘3.1.2’) gives length 96:

install.packages("lintr")

library(lintr)

length(all_linters())
#> [1] 96

Do you think this should be explicitly mentioned, with say, As of this writing, the development version of {lintr} from GitHub offers 113 linters? Followed by,

# install.packages("remotes")
remotes::install_github("r-lib/lintr")
library(lintr)

length(all_linters())

#> [1] 113

@SaranjeetKaur
Copy link

I can't seem to find the contributing guidelines (for the community) in the package directory. Please let me know if I missed something - I was looking for something like the dplyr's CONTRIBUTING.md

@IndrajeetPatil
Copy link

We have two different guidelines:

The closest thing we have to contributing guidelines is a vignette explaining how to add new linters to the package:
https://lintr.r-lib.org/articles/creating_linters.html

@IndrajeetPatil
Copy link

Do you think this should be explicitly mentioned, with say, As of this writing, the development version of {lintr} from GitHub offers 113 linters? Followed by,

I am not sure. We might have a new release before this submission is accepted and published (cf. r-lib/lintr#2392).
WDYT, @MichaelChirico?

@SaranjeetKaur
Copy link

We have two different guidelines:

The closest thing we have to contributing guidelines is a vignette explaining how to add new linters to the package: https://lintr.r-lib.org/articles/creating_linters.html

Nice! I can see that the vignette on creating_linters talks about submitting a pull request. Do you think it is worthwhile to create a .github/CONTRIBUTING.md file and appropriately link such stuff? It might potentially have sections like:

@MichaelChirico
Copy link

We might have a new release before this submission is accepted and published

We can push for that if it's a priority, what's the timeline for when this paper would be published?

@lrnv
Copy link

lrnv commented Nov 5, 2024

No timeline, it would be published when it is ready. Yes, usually, people synchronize that with a (at least patch) release, but this is not mandatory. We can also delay publication until this release is made if you think it'll be clearer.

Note that the paper refers to a specific version of the software, so you mifgyht phrase that as "As of versions X.X.X, 113, but more to be expected in the future"

@lrnv
Copy link

lrnv commented Nov 29, 2024

@JosiahParry, @SaranjeetKaur gentle bump: what is the status of this review on your side ? Are you still waiting for modifications / improvements ?

@SaranjeetKaur
Copy link

I've dropped some minor comments above. Once they are addressed it should be all good from my side.

@IndrajeetPatil
Copy link

Thanks for the nudge, @lrnv. I have an open PR in the repo to address @SaranjeetKaur's feedback (r-lib/lintr#2683). :)

@SaranjeetKaur
Copy link

Thanks for the prompt response @IndrajeetPatil! The PR looks great!

Do you expect any discussion about the new release or mentioning the specific version of the package in the paper?

Otherwise, this looks all good to me. Thanks a lot for all the amazing work you all have put in!

@IndrajeetPatil
Copy link

@SaranjeetKaur Yes, I would personally prefer to wait for this paper to be approved/published until the next version of this package is out on CRAN.

But I need to hand the baton over to @MichaelChirico at this point as he is the current maintainer.

@SaranjeetKaur
Copy link

@IndrajeetPatil - it is all fine by me! I don't have any further comments. Could you or @MichaelChirico, please let us know whenever the next version of the package is out on CRAN?

@lrnv - is it okay if we have to wait for this paper to published until the next version of the package is out?

@MichaelChirico
Copy link

Is {lintr} release the only current blocker, or are there other pending items? We are also trying to get {data.table} salvaged from the CRAN hammer so I need to prioritize OSS time :)

@lrnv
Copy link

lrnv commented Dec 2, 2024

@lrnv - is it okay if we have to wait for this paper to published until the next version of the package is out?

Yes its ok, now that the submission is sucessfully reviewed, this can wait. Just bump me in here when you are ready to move forward, and we'll continue the publishing process.

@SaranjeetKaur
Copy link

Is {lintr} release the only current blocker, or are there other pending items?

@MichaelChirico No other pending items from me. Please feel free to prioritise as you see fit and drop a message to @lrnv here whenever you are ready to move to the publication process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Track: 5 (DSAIS) Data Science, Artificial Intelligence, and Machine Learning
Projects
None yet
Development

No branches or pull requests

6 participants