chore: run pre-commit on all files (#10119)

This commit is contained in:
Aaron Ang
2026-02-04 16:12:53 -05:00
committed by GitHub
parent 4854ba692e
commit c9c78b2415
33 changed files with 165 additions and 172 deletions
+1 -1
View File
@@ -59,4 +59,4 @@ jobs:
issue_number: issue_number,
body: 'GNU testsuite comparison:\n```\n' + content + '```'
});
}
}
-1
View File
@@ -3,4 +3,3 @@ MD013: false
# Disable 'Fenced code blocks should have a language specified'
# Doesn't provide much in src/ to enforce it
MD040: false
+1 -1
View File
@@ -7,7 +7,7 @@ repos:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-json
exclude: '.vscode/cSpell\.json' # cSpell.json uses comments
exclude: '\.vscode/(cSpell|extensions)\.json' # cSpell.json and extensions.json use comments
- id: check-shebang-scripts-are-executable
exclude: '.+\.rs' # would be triggered by #![some_attribute]
- id: check-symlinks
+2 -2
View File
@@ -1,8 +1,8 @@
// spell-checker:ignore (misc) matklad foxundermoon
// spell-checker:ignore (misc) foxundermoon
// see <http://go.microsoft.com/fwlink/?LinkId=827846> for the documentation about the extensions.json format
// *
// "foxundermoon.shell-format" ~ shell script formatting ; note: ENABLE "Use EditorConfig"
// "matklad.rust-analyzer" ~ `rust` language support
// "rust-lang.rust-analyzer" ~ `rust` language support
// "streetsidesoftware.code-spell-checker" ~ `cspell` spell-checker support
{
"recommendations": [
+1 -1
View File
@@ -119,7 +119,7 @@ cargo build --release --features windows
cargo build --release --features unix
```
To build SELinux-specific features, including `chcon` and `runcon`, ensure that `libselinux`
To build SELinux-specific features, including `chcon` and `runcon`, ensure that `libselinux`
and `libclang` are installed on your system. Then, run the following command:
```
cargo build --release --features unix,feat_selinux
-1
View File
@@ -28,4 +28,3 @@ uutils coreutils is a cross-platform reimplementation of the GNU coreutils in
[Rust](http://www.rust-lang.org).
This package does not have its specific `README.md`.
+1 -1
View File
@@ -2,4 +2,4 @@ book
src/utils
src/SUMMARY.md
src/platform_table.md
tldr.zip
tldr.zip
Regular → Executable
View File
+1 -1
View File
@@ -43,4 +43,4 @@
}
.counts {
margin-right: 10px;
}
}
-1
View File
@@ -4,4 +4,3 @@ dirname-after-help = Afficher chaque NOM avec son dernier composant non-slash et
supprimés ; si NOM ne contient pas de '/', afficher '.' (signifiant le répertoire courant).
dirname-missing-operand = opérande manquant
dirname-zero-help = séparer la sortie avec NUL plutôt qu'avec un saut de ligne
-1
View File
@@ -58,4 +58,3 @@ With Cargo Flamegraph you can easily make a flamegraph of `rm`:
```shell
cargo flamegraph --cmd coreutils -- rm [additional parameters]
```
-1
View File
@@ -12,4 +12,3 @@ sleep-error-missing-operand = opérande manquant
# Messages d'aide
sleep-help-number = faire une pause de NOMBRE secondes
-1
View File
@@ -63,4 +63,3 @@ hyperfine 'tr -d aeiou < mixed_input > /dev/null' './target/release/tr -d aeiou
- Uses lookup tables instead of hash maps for O(1) operations
- 32KB I/O buffers for improved throughput
- Should be competitive with GNU `tr` for most operations
+10 -10
View File
@@ -1,12 +1,12 @@
# Benchmarking `tsort`
<!-- spell-checker:ignore (words) randint tsort DAG uu_tsort GNU -->
Much of what makes `tsort` fast is the efficiency of its algorithm and implementation for topological sorting.
Our implementation of `tsort` also outputs a cycle whenever such ordering does not exist, just like GNU `tsort`.
Much of what makes `tsort` fast is the efficiency of its algorithm and implementation for topological sorting.
Our implementation of `tsort` also outputs a cycle whenever such ordering does not exist, just like GNU `tsort`.
## Strategies
To test `tsort`'s performance for its nominal use case, we need to test it with a DAG. One of the worst cases is when all nodes are just representing a succession of independent steps.
We should also test cycle detection for good measure.
To test `tsort`'s performance for its nominal use case, we need to test it with a DAG. One of the worst cases is when all nodes are just representing a succession of independent steps.
We should also test cycle detection for good measure.
### Random acyclic graph (DAG)
@@ -25,16 +25,16 @@ for i in range(100*N):
### Random graph with cycles
The following will output a graph with multiples edges, it also allows some degree of tuning to test different cases.
The following will output a graph with multiples edges, it also allows some degree of tuning to test different cases.
```python
import random
# Parameters for the graph
num_nodes = 100
num_edges = 150
cycle_percentage = 0.10
max_cycle_size = 6
num_nodes = 100
num_edges = 150
cycle_percentage = 0.10
max_cycle_size = 6
num_cycles = int(num_edges * cycle_percentage)
@@ -52,7 +52,7 @@ for _ in range(num_cycles):
```
## Running Benchmarks
The above scripts will output the generated graphs to the standard output. They can therefore be used directly as tests. In order to run a Benchmark, the output should be redirected to a file.
The above scripts will output the generated graphs to the standard output. They can therefore be used directly as tests. In order to run a Benchmark, the output should be redirected to a file.
Use [`hyperfine`](https://github.com/sharkdp/hyperfine) to compare the performance of different `tsort` versions. For example, you can compare the performance of GNU `tsort` and another implementation with the following command:
```sh
+1 -1
View File
@@ -1 +1 @@
* -text diff
* -text diff
Vendored Regular → Executable
View File
Vendored Regular → Executable
View File
Regular → Executable
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More