Skip to content

Releases: worldbank/stata-linter

v1.02

11 Apr 18:45
a58ebd4
Compare
Choose a tag to compare

Version available in Stata's SSC repository as of XX April 2023. Log of changes:

  • Changed version format from X.X to X.XX
  • Corrected bug in the detection of implicit if statements for conditions in inrange() and inlist(), as pointed out in #70
  • Changed detection of implicit if statements so that they also work for if in the middle of a line and not only when if or else if are the first non-space characters in a line
  • Corrected bug in the detection of whitespace symbols around the minus symbol (-) when used in negative numbers, as pointed out in #71
  • Corrected link to repository included in SSC/Repec description of the package, as pointed out in #76

v1.1

12 Dec 22:01
09ba951
Compare
Choose a tag to compare

Version available in Stata's SSC repository as of December 12 2022. Log of changes:

  • Corrected bug in function detecting if a line is closing a loop so that in can handle empty lines
  • Changed command version format from x.x.x to x.x
  • Updated name in acknowledgments

Version 1.0

06 Dec 22:13
Compare
Choose a tag to compare

First official release of the command, similar to the one available in the SSC repository.

These are the issues solved in this version with respect of v0.0.4:

Command functionality and outputs

  • Removed nocheck option (issue 24)
  • Added link to the output generated by the detect and correct functionalities (issue 25)
  • Added function to check if an input path is a folder of a do-file (issue 29)
  • Added function to check there is not a mismatch between the versions of Python scripts and the command ado (issue 30)
  • Updated the reference link to the Stata linter page in the DIME Wiki (issue 39)
  • Updated the "correct" functionality so that it only asks for the errors detected (as opposed to all the errors possible to correct) when not using the option automatic (issue 40)
  • Split the check of potential omission of missing values in condition out of using missing() instead of . (issue 46)
  • Changed name of inprep option to force (requested in a comment in #32)
  • Added an informative message when the response to prompt asking to correct issues is invalid ((requested in a comment in #32 )
  • Added a function to check that openpyxl is installed when exporting list of issues to excel

Bugs corrected

  • Modified function to detect omitted space between math operators so that it doesn't flag decimals that omit the zero (i.e.: .5 instead of 0.5) (issue 38)
  • Fixed incorrect replacement of tabs with spaces for cases where there are spaces before the tab character (issue 41)
  • Modified function that detects bad indentation after /// so that it checks not only the first line after /// but all subsequent lines that should have indentation (issue 43)
  • Corrected function to detect potential omission of missing values so that it doesn't flag cases when conditions for missings are explicitly defined (issue 49)
  • Modified detection of indentation in lines after /// so that it takes into account any existing indentation in the first line (issue 52)
  • Corrected function breaking long lines so that it breaks lines more than once and works in lines ending with /// (issues 53, 55, and 54)
  • Corrected omissions in the detection of whitespace around operators, global references without curly brackets, and use of . instead of missing() (issue 56)
  • Corrected detection of backslashes so that it only flags cases when they are present in lines with locals, globals, or the command cd; which are the probable cases when they are used to change a file path (issue 58)
  • Modified detection of omitted spaces around math symbols so that it doesn't flag comments (requested in a comment in #32 )
  • Modified replacement of hard tabs with spaces so that it works in comment lines and when they appear at the beginning of a line (requested in comments in #32 )

Documentation

  • Removed outdated references to "DECIE" in the help file (issue 34)
  • Updated the help file to explain more clearly the differences between "correct" and "detect", and that "correct" does not fix all the issues listed in "detect" (issue 35)-

Stata Linter Version 0.0.4

11 Jun 03:33
65cb5b5
Compare
Choose a tag to compare
  • Unified lint command to detect and correct do-files.
  • Visit the wiki for the documentation.