Releases: worldbank/stata-linter
Releases · worldbank/stata-linter
v1.02
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 ininrange()
andinlist()
, as pointed out in #70 - Changed detection of implicit
if
statements so that they also work forif
in the middle of a line and not only whenif
orelse 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
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
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 toforce
(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 ofmissing()
(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
Stata Linter Version 0.0.4
- Unified
lint
command to detect and correct do-files. - Visit the wiki for the documentation.