generated from opensafely-core/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tighten up validation of output paths
1) require that they have a file extension, and are not an openended * glob. 2) require `moderately_sensitive` output paths to be of the correct type. Note: requiring file extensions on path globs has 3 benefits: 1) It allows us catch file type errors statically (the main goal of this PR) 2) It stops an open ended * from capturing unintented outputs 3) It helps ensure path globs are unique, which is a useful property, especially when we move to specifiying files inputs rather than `needs`.
- Loading branch information
1 parent
55fda77
commit 761fc08
Showing
5 changed files
with
54 additions
and
23 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,2 +1,23 @@ | ||
# The magic action name which means "run every action" | ||
RUN_ALL_COMMAND = "run_all" | ||
|
||
LEVEL4_FILE_TYPES = set( | ||
[ | ||
# tables | ||
".csv", | ||
".tsv", | ||
# images | ||
".jpg", | ||
".jpeg", | ||
".png", | ||
".svg", | ||
".svgz", | ||
# reports | ||
".html", | ||
".pdf", | ||
".txt", | ||
".log", | ||
".json", | ||
".md", | ||
] | ||
) |
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
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