Skip to content

file_util: improve rmtree performance

8dfb4d0
Select commit
Loading
Failed to load commit list.
Open

file_util: improve rmtree performance #1672

file_util: improve rmtree performance
8dfb4d0
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / vcs-diff-lint succeeded Dec 9, 2025 in 9s

16 new alerts

New alerts in code changed by this pull request

  • 16 warnings

See annotations below for details.

View all branch alerts.

Annotations

Check warning on line 44 in mock/py/mockbuild/file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

_recursive_rmtree: Too many statements (51/50) Warning

_recursive_rmtree: Too many statements (51/50)

Check warning on line 1 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

Missing module docstring Warning test

Missing module docstring

Check warning on line 41 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

chattr_works_or_skip: Missing function or method docstring Warning test

chattr_works_or_skip: Missing function or method docstring

Check warning on line 59 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_regular_directory: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_regular_directory: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 75 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_nonexistent_directory: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_nonexistent_directory: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 83 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_with_exclude: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_with_exclude: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 116 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_top_level_excluded: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_top_level_excluded: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 133 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_immutable_file_with_selinux: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_immutable_file_with_selinux: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 158 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_immutable_file_without_selinux: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_immutable_file_without_selinux: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 167 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_readonly_file: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_readonly_file: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 180 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_directory_with_readonly_dir: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_directory_with_readonly_dir: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 209 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_symlink_itself: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_symlink_itself: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 222 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_on_broken_symlink: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_on_broken_symlink: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 237 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_error_retry_simulated: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_error_retry_simulated: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 265 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_long_path: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_long_path: Redefining name 'temp_dir' from outer scope (line 14)

Check warning on line 306 in mock/tests/test_file_util.py

See this annotation in the file changed.

Code scanning / vcs-diff-lint

TestRmtree.test_rmtree_symlink_out: Redefining name 'temp_dir' from outer scope (line 14) Warning test

TestRmtree.test_rmtree_symlink_out: Redefining name 'temp_dir' from outer scope (line 14)