Skip to content

Commit 67ee620

Browse files
sryzayhuang-db
authored andcommitted
[MINOR] Ensure structured_logging_style runs out of correct directory
### What changes were proposed in this pull request? Currently, `structured_logging_style.py` assumes that it's being run from the `dev` directory. If it's run from the project root, it will scan all files in the parent directory, i.e. outside the project root. I encountered this and was surprised that it was taking minutes just in the globbing step. This change avoids that assumption, so `python dev/structured_logging_style.py` will still produce correct results. ### Why are the changes needed? Make it easier for developers to run the structured logging checks locally. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? ``` dev/structured_logging_style.py ``` ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#51087 from sryza/structured-logging-dir. Authored-by: Sandy Ryza <sandy.ryza@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent b35ec96 commit 67ee620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dev/structured_logging_style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def main():
4141

4242
nonmigrated_files = {}
4343

44-
scala_files = glob.glob(os.path.join("../", "**", "*.scala"), recursive=True)
44+
scala_files = glob.glob(os.path.join(__file__, "../", "**", "*.scala"), recursive=True)
4545

4646
for file in scala_files:
4747
skip_file = False

0 commit comments

Comments
 (0)