Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify-path-length.yml should report all files exceeding allowed length #1156

Closed
mikeharder opened this issue Oct 30, 2020 · 1 comment
Closed
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Comments

@mikeharder
Copy link
Member

verify-path-length.yml should report all files exceeding the allowed length, to make it easier to detect and fix all such files in one pass. I believe the current logic is to keep track of the longest path seen so far, and only report files longer than this. This looks like a bug or design flaw in the script.

for root, dirs, files in os.walk('{0}'.format(source_directory)):
for file in files:
file_path = os.path.relpath(os.path.join(root, file), source_directory)
if ((len(file_path) + ${{ parameters.BasePathLength }}) > longest_file_path_length):
longest_file_path_length = len(file_path) + ${{ parameters.BasePathLength }}
longest_file_path = file_path
if (longest_file_path_length >= 260):
long_file_paths.append(longest_file_path)
dir_path = os.path.relpath(root, source_directory)
if ((len(dir_path) + ${{ parameters.BasePathLength }}) > longest_dir_path_length):
longest_dir_path_length = len(dir_path) + ${{ parameters.BasePathLength }}
longest_dir_path = dir_path
if (longest_dir_path_length >= 248):
long_dir_paths.append(longest_dir_path)

@weshaggard weshaggard added Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system. labels Oct 30, 2020
@chidozieononiwu
Copy link
Member

Fixed with #1158

sima-zhu pushed a commit to sima-zhu/azure-sdk-tools that referenced this issue Dec 3, 2020
rename functions, refactor for consistency with other samples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.
Projects
None yet
Development

No branches or pull requests

3 participants