-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from worldbank/v1.1
v1.1 - 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
- Loading branch information
Showing
7 changed files
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
*! version 1.0.0 06dec2022 DIME Analytics [email protected] | ||
*! version 1.1 07dec2022 DIME Analytics [email protected] | ||
|
||
capture program drop lint | ||
program lint | ||
|
@@ -536,7 +536,7 @@ capture program drop _checkversions | |
|
||
* IMPORTANT: Every time we have a package update, update the version number here | ||
* Otherwise we'd be introducing a major bug! | ||
local version_ado 1.0.0 | ||
local version_ado 1.1 | ||
|
||
* Check versions of .py files | ||
python: from sfi import Macro | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# version 1.0.0 06dec2022 DIME Analytics [email protected] | ||
# version 1.1 07dec2022 DIME Analytics [email protected] | ||
# Import packages ============ | ||
import os | ||
import re | ||
|
@@ -8,7 +8,7 @@ | |
# Version Global | ||
## VERY IMPORTANT: Update the version number here every time there's an update | ||
## in the package. Otherwise this will cause a major bug | ||
VERSION = "1.0.0" | ||
VERSION = "1.1" | ||
|
||
# Function to update comment delimiter ============= | ||
# (detection works only when comment delimiter == 0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# version 1.0.0 06dec2022 DIME Analytics [email protected] | ||
# version 1.1 07dec2022 DIME Analytics [email protected] | ||
# Import packages ==================== | ||
import os | ||
import re | ||
|
@@ -9,7 +9,7 @@ | |
# Version Global | ||
## VERY IMPORTANT: Update the version number here every time there's an update | ||
## in the package. Otherwise this will cause a major bug | ||
VERSION = "1.0.0" | ||
VERSION = "1.1" | ||
|
||
# simple run entry point | ||
def run(): | ||
|
@@ -101,8 +101,15 @@ def loop_close(line): | |
''' | ||
Detects if a line is closing a loop | ||
''' | ||
if re.split('//', line)[0].rstrip()[-1] =='}': | ||
return True | ||
relevant_part = re.split('//', line)[0].rstrip() | ||
|
||
if len(relevant_part) > 0: | ||
|
||
if relevant_part[-1] =='}': | ||
return True | ||
else: | ||
return False | ||
|
||
else: | ||
return False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# version 1.0.0 06dec2022 DIME Analytics [email protected] | ||
# version 1.1 07dec2022 DIME Analytics [email protected] | ||
# Import packages ==================== | ||
import re | ||
import pandas as pd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
v 1.0.0 | ||
v 1.1 | ||
d DIME Analytics, World Bank Group, Development Economics Research | ||
p stata_linter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
v 1.0.0 | ||
v 1.1 | ||
d DIME Analytics, World Bank Group, Development Economics Research | ||
p stata_linter | ||
f /src/stata_linter_detect.py | ||
f /src/stata_linter_correct.py | ||
f /src/stata_linter_utils.py | ||
f /src/lint.ado | ||
f /help/lint.sthlp | ||
f /src/lint.sthlp | ||
e |