gentle-flower-25372
02/28/2024, 4:39 PMgentle-flower-25372
02/28/2024, 4:44 PMfiledeps
goal along with some shell commands to compare against all files in your repo. Here's a quick way to do it:
1. Generate a list of all files that Pants knows about:
pants filedeps :: > pants_files.txt
1. Generate a list of all files in your repository (adjust the find
command as needed for your repo structure):
find . -type f > all_files.txt
1. Compare the two lists to find files not known to Pants:
comm -23 <(sort all_files.txt) <(sort pants_files.txt) > unknown_files.txt
Check unknown_files.txt
for any files not belonging to any target. Adjust the find
command to exclude directories or files as necessary for your project's structure.gentle-flower-25372
02/28/2024, 4:45 PMgentle-flower-25372
02/28/2024, 4:47 PMfast-nail-55400
02/28/2024, 5:16 PMexpermential_test_shell_command
to write a validation check. Specify one of your output targets as a dependency of the test target, and then write some shell commands to ensure the files you want are in fact in the output.fast-nail-55400
02/28/2024, 5:17 PMtest
goal.curved-television-6568
02/28/2024, 5:28 PMgentle-flower-25372
02/28/2024, 5:58 PM