Skip to content

Commit

Permalink
troubleshooting lint file
Browse files Browse the repository at this point in the history
  • Loading branch information
kbjarkefur committed Sep 30, 2024
1 parent 5d8f242 commit 26b38c3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/mdhlp/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For this command to run, you will need Stata version 16 or greater, Python, and
To install Python and integrate it with Stata, refer to [this page](https://blog.stata.com/2020/08/18/stata-python-integration-part-1-setting-up-stata-to-use-python/).

To install Python packages, refer to [this page](https://blog.stata.com/2020/09/01/stata-python-integration-part-3-how-to-install-python-packages/).

<!--
# Syntax
__lint__ "_input_file_" [using "_output_file_"] , [_options_]
Expand All @@ -26,7 +26,7 @@ If an _output_file_ is specified with __using__, then the linter will apply the
| __**v**erbose__ | Report bad practices and issues found on each line of the do-file. |
| __**nosum**mary__ | Suppress summary table of bad practices and potential issues. |
| __**i**ndent__(_integer_) | Number of whitespaces used when checking indentation coding practices (default: 4). |
| __**s**pace__(_integer_) | Number of whitespaces used instead of hard tabs when checking indentation practices (default: same as indent). |
| __**s**pace__(_integer_) | Number of whitespaces used instead of hard tabs when checking indentation practices (default: same as indent). |
| __**l**inemax__(_integer_) | Maximum number of characters in a line when checking line extension practices (default: 80). |
| __**e**xcel__(_filename_) | Save an Excel file of line-by-line results. |
| __force__ | Allow the output file name to be the same as the name of the input file; overwriting the original do-file. __The use of this option is not recommended__ because it is slightly possible that the corrected do-file created by the command will break something in your code and you should always keep a backup of it. |
Expand All @@ -36,7 +36,7 @@ If an _output_file_ is specified with __using__, then the linter will apply the
# Description
## Detect functionality
## Detect functionality
__Bad style practices and potential issues detected:__
Expand All @@ -51,9 +51,9 @@ __Avoid abstract index names__
```
foreach i of varlist cassava maize wheat { }
```
```
- Instead, looping commands should name the index local descriptively:
Instead, looping commands should name the index local descriptively:
```
foreach crop of varlist cassava maize wheat { }
Expand All @@ -62,9 +62,9 @@ __Avoid abstract index names__
__Use proper indentations__
- After declaring for-loop statements or if-else statements, add indentation with whitespaces (usually 2 or 4) in the lines inside the loop.
After declaring for-loop statements or if-else statements, add indentation with whitespaces (usually 2 or 4) in the lines inside the loop.

__Use indentations after declaring newline symbols (///)__
- After a new line statement (///), add indentation (usually 2 or 4 whitespaces).
Expand Down Expand Up @@ -146,7 +146,7 @@ If the option `automatic` is omitted, Stata will prompt the user to confirm that
# Examples
The following examples illustrate the basic usage of lint. Additional examples can be found [here](https://github.com/worldbank/repkit/blob/add-linter/src/vignettes/lint-examples.md)
## Detecting bad coding practices
The basic usage is to point to a do-file that requires revision as follows:
Expand All @@ -166,7 +166,7 @@ lint "test/bad.do", verbose
```
2. Remove the summary of bad practices
```
lint "test/bad.do", nosummary
```
Expand Down Expand Up @@ -238,7 +238,7 @@ lint "test/bad.do" using "test/bad_corrected.do", automatic replace
# Feedback, bug reports and contributions
Read more about these commands on [this repo](https://github.com/worldbank/repkit) where this package is developed. Please provide any feedback by [opening an issue](https://github.com/worldbank/repkit/issues). PRs with suggestions for improvements are also greatly appreciated.
Read more about these commands on [this repo](https://github.com/worldbank/repkit) where this package is developed. Please provide any feedback by [opening an issue](https://github.com/worldbank/repkit/issues). PRs with suggestions for improvements are also greatly appreciated. -->

# Authors

Expand Down

0 comments on commit 26b38c3

Please sign in to comment.