├── .dockerignore ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ ├── docker.yml │ ├── nightly.yml │ ├── release.yml │ └── stable.yml ├── .gitignore ├── .pre-commit-hooks.yaml ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── README.md ├── changelog.md ├── examp ├── clippy.fmt.toml ├── clippy.toml ├── comments.sorted.toml ├── comments.toml ├── equal_sign.toml ├── fend.toml ├── ftop.toml ├── newline.toml ├── noreorder.toml ├── reorder.toml ├── right.toml ├── ru.toml ├── ruma.sorted.toml ├── ruma.toml ├── test.toml ├── trailing.toml ├── tun.sorted.toml ├── tun.toml ├── win.toml ├── work.toml ├── workspace.sorted.toml ├── workspace.toml ├── workspace_deps.sorted.toml └── workspace_deps.toml ├── fixtures ├── README.md ├── invalid │ ├── array-mixed-types-arrays-and-ints.toml │ ├── array-mixed-types-ints-and-floats.toml │ ├── array-mixed-types-strings-and-ints.toml │ ├── datetime-malformed-no-leads.toml │ ├── datetime-malformed-no-secs.toml │ ├── datetime-malformed-no-t.toml │ ├── datetime-malformed-with-milli.toml │ ├── duplicate-key-table.toml │ ├── duplicate-keys.toml │ ├── duplicate-tables.toml │ ├── empty-implicit-table.toml │ ├── empty-table.toml │ ├── float-leading-zero-neg.toml │ ├── float-leading-zero-pos.toml │ ├── float-leading-zero.toml │ ├── float-no-leading-zero.toml │ ├── float-no-trailing-digits.toml │ ├── float-underscore-after-point.toml │ ├── float-underscore-after.toml │ ├── float-underscore-before-point.toml │ ├── float-underscore-before.toml │ ├── integer-invalid-binary-char.toml │ ├── integer-invalid-hex-char.toml │ ├── integer-invalid-octal-char.toml │ ├── integer-leading-zero-neg.toml │ ├── integer-leading-zero-pos.toml │ ├── integer-leading-zero.toml │ ├── integer-underscore-after.toml │ ├── integer-underscore-before.toml │ ├── integer-underscore-double.toml │ ├── key-after-array.toml │ ├── key-after-table.toml │ ├── key-empty.toml │ ├── key-hash.toml │ ├── key-newline.toml │ ├── key-no-eol.toml │ ├── key-open-bracket.toml │ ├── key-single-open-bracket.toml │ ├── key-space.toml │ ├── key-start-bracket.toml │ ├── key-two-equals.toml │ ├── llbrace.toml │ ├── rrbrace.toml │ ├── string-bad-byte-escape.toml │ ├── string-bad-escape.toml │ ├── string-bad-surrogate.toml │ ├── string-bad-uni-esc.toml │ ├── string-byte-escapes.toml │ ├── string-no-close.toml │ ├── table-array-implicit.toml │ ├── table-array-malformed-bracket.toml │ ├── table-array-malformed-empty.toml │ ├── table-empty.toml │ ├── table-nested-brackets-close.toml │ ├── table-nested-brackets-open.toml │ ├── table-whitespace.toml │ ├── table-with-pound.toml │ ├── text-after-array-entries.toml │ ├── text-after-integer.toml │ ├── text-after-string.toml │ ├── text-after-table.toml │ ├── text-before-array-separator.toml │ └── text-in-array.toml └── valid │ ├── array-empty.json │ ├── array-empty.toml │ ├── array-nospaces.json │ ├── array-nospaces.toml │ ├── arrays-hetergeneous.json │ ├── arrays-hetergeneous.toml │ ├── arrays-nested.json │ ├── arrays-nested.toml │ ├── arrays.json │ ├── arrays.toml │ ├── bool.json │ ├── bool.toml │ ├── comments-at-eof.json │ ├── comments-at-eof.toml │ ├── comments-at-eof2.json │ ├── comments-at-eof2.toml │ ├── comments-everywhere.json │ ├── comments-everywhere.toml │ ├── datetime.json │ ├── datetime.toml │ ├── empty.json │ ├── empty.toml │ ├── example.json │ ├── example.toml │ ├── float-exponent.json │ ├── float-exponent.toml │ ├── float-underscore.json │ ├── float-underscore.toml │ ├── float.json │ ├── float.toml │ ├── implicit-and-explicit-after.json │ ├── implicit-and-explicit-after.toml │ ├── implicit-and-explicit-before.json │ ├── implicit-and-explicit-before.toml │ ├── implicit-groups.json │ ├── implicit-groups.toml │ ├── inline-table.json │ ├── inline-table.toml │ ├── integer-underscore.json │ ├── integer-underscore.toml │ ├── integer.json │ ├── integer.toml │ ├── key-equals-nospace.json │ ├── key-equals-nospace.toml │ ├── key-numeric.json │ ├── key-numeric.toml │ ├── key-space.json │ ├── key-space.toml │ ├── key-special-chars.json │ ├── key-special-chars.toml │ ├── long-float.json │ ├── long-float.toml │ ├── long-integer.json │ ├── long-integer.toml │ ├── multiline-string.json │ ├── multiline-string.toml │ ├── raw-multiline-string.json │ ├── raw-multiline-string.toml │ ├── raw-string.json │ ├── raw-string.toml │ ├── string-empty.json │ ├── string-empty.toml │ ├── string-escapes.json │ ├── string-escapes.toml │ ├── string-nl.json │ ├── string-nl.toml │ ├── string-simple.json │ ├── string-simple.toml │ ├── string-with-pound.json │ ├── string-with-pound.toml │ ├── table-array-implicit.json │ ├── table-array-implicit.toml │ ├── table-array-many.json │ ├── table-array-many.toml │ ├── table-array-nest.json │ ├── table-array-nest.toml │ ├── table-array-one.json │ ├── table-array-one.toml │ ├── table-empty.json │ ├── table-empty.toml │ ├── table-no-eol.json │ ├── table-no-eol.toml │ ├── table-sub-empty.json │ ├── table-sub-empty.toml │ ├── table-whitespace.json │ ├── table-whitespace.toml │ ├── table-with-literal-string.json │ ├── table-with-literal-string.toml │ ├── table-with-pound.json │ ├── table-with-pound.toml │ ├── table-with-single-quotes.json │ ├── table-with-single-quotes.toml │ ├── unicode-escape.json │ ├── unicode-escape.toml │ ├── unicode-literal.json │ ├── unicode-literal.toml │ ├── windows-path.json │ └── windows-path.toml ├── regressions ├── 104.toml └── README.md ├── rustfmt.toml ├── src ├── fmt.rs ├── fuzz.rs ├── main.rs ├── sort.rs └── test_utils.rs └── tomlfmt.toml /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.dockerignore -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.gitattributes -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: DevinR528 2 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.github/workflows/docker.yml -------------------------------------------------------------------------------- /.github/workflows/nightly.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.github/workflows/nightly.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.github/workflows/stable.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.github/workflows/stable.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .VSCodeCounter/ 2 | /.vs 3 | /target 4 | **/*.rs.bk 5 | 6 | .vscode 7 | /out 8 | -------------------------------------------------------------------------------- /.pre-commit-hooks.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/.pre-commit-hooks.yaml -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/Cargo.toml -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/Dockerfile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/README.md -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/changelog.md -------------------------------------------------------------------------------- /examp/clippy.fmt.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/clippy.fmt.toml -------------------------------------------------------------------------------- /examp/clippy.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/clippy.toml -------------------------------------------------------------------------------- /examp/comments.sorted.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/comments.sorted.toml -------------------------------------------------------------------------------- /examp/comments.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/comments.toml -------------------------------------------------------------------------------- /examp/equal_sign.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/equal_sign.toml -------------------------------------------------------------------------------- /examp/fend.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/fend.toml -------------------------------------------------------------------------------- /examp/ftop.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/ftop.toml -------------------------------------------------------------------------------- /examp/newline.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/newline.toml -------------------------------------------------------------------------------- /examp/noreorder.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/noreorder.toml -------------------------------------------------------------------------------- /examp/reorder.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/reorder.toml -------------------------------------------------------------------------------- /examp/right.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/right.toml -------------------------------------------------------------------------------- /examp/ru.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/ru.toml -------------------------------------------------------------------------------- /examp/ruma.sorted.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/ruma.sorted.toml -------------------------------------------------------------------------------- /examp/ruma.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/ruma.toml -------------------------------------------------------------------------------- /examp/test.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/test.toml -------------------------------------------------------------------------------- /examp/trailing.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/trailing.toml -------------------------------------------------------------------------------- /examp/tun.sorted.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/tun.sorted.toml -------------------------------------------------------------------------------- /examp/tun.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/tun.toml -------------------------------------------------------------------------------- /examp/win.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/win.toml -------------------------------------------------------------------------------- /examp/work.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/work.toml -------------------------------------------------------------------------------- /examp/workspace.sorted.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/workspace.sorted.toml -------------------------------------------------------------------------------- /examp/workspace.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/workspace.toml -------------------------------------------------------------------------------- /examp/workspace_deps.sorted.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/workspace_deps.sorted.toml -------------------------------------------------------------------------------- /examp/workspace_deps.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/examp/workspace_deps.toml -------------------------------------------------------------------------------- /fixtures/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/README.md -------------------------------------------------------------------------------- /fixtures/invalid/array-mixed-types-arrays-and-ints.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/array-mixed-types-arrays-and-ints.toml -------------------------------------------------------------------------------- /fixtures/invalid/array-mixed-types-ints-and-floats.toml: -------------------------------------------------------------------------------- 1 | ints-and-floats = [1, 1.1] 2 | -------------------------------------------------------------------------------- /fixtures/invalid/array-mixed-types-strings-and-ints.toml: -------------------------------------------------------------------------------- 1 | strings-and-ints = ["hi", 42] 2 | -------------------------------------------------------------------------------- /fixtures/invalid/datetime-malformed-no-leads.toml: -------------------------------------------------------------------------------- 1 | no-leads = 1987-7-05T17:45:00Z 2 | -------------------------------------------------------------------------------- /fixtures/invalid/datetime-malformed-no-secs.toml: -------------------------------------------------------------------------------- 1 | no-secs = 1987-07-05T17:45Z 2 | -------------------------------------------------------------------------------- /fixtures/invalid/datetime-malformed-no-t.toml: -------------------------------------------------------------------------------- 1 | no-t = 1987-07-0517:45:00Z 2 | -------------------------------------------------------------------------------- /fixtures/invalid/datetime-malformed-with-milli.toml: -------------------------------------------------------------------------------- 1 | with-milli = 1987-07-5T17:45:00.12Z 2 | -------------------------------------------------------------------------------- /fixtures/invalid/duplicate-key-table.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/duplicate-key-table.toml -------------------------------------------------------------------------------- /fixtures/invalid/duplicate-keys.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/duplicate-keys.toml -------------------------------------------------------------------------------- /fixtures/invalid/duplicate-tables.toml: -------------------------------------------------------------------------------- 1 | [a] 2 | [a] 3 | -------------------------------------------------------------------------------- /fixtures/invalid/empty-implicit-table.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/empty-implicit-table.toml -------------------------------------------------------------------------------- /fixtures/invalid/empty-table.toml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-leading-zero-neg.toml: -------------------------------------------------------------------------------- 1 | leading-zero = -03.14 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-leading-zero-pos.toml: -------------------------------------------------------------------------------- 1 | leading-zero = +03.14 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-leading-zero.toml: -------------------------------------------------------------------------------- 1 | leading-zero = 03.14 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-no-leading-zero.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/float-no-leading-zero.toml -------------------------------------------------------------------------------- /fixtures/invalid/float-no-trailing-digits.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/float-no-trailing-digits.toml -------------------------------------------------------------------------------- /fixtures/invalid/float-underscore-after-point.toml: -------------------------------------------------------------------------------- 1 | bad = 1._2 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-underscore-after.toml: -------------------------------------------------------------------------------- 1 | bad = 1.2_ 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-underscore-before-point.toml: -------------------------------------------------------------------------------- 1 | bad = 1_.2 2 | -------------------------------------------------------------------------------- /fixtures/invalid/float-underscore-before.toml: -------------------------------------------------------------------------------- 1 | bad = _1.2 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-invalid-binary-char.toml: -------------------------------------------------------------------------------- 1 | bad = 0b102 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-invalid-hex-char.toml: -------------------------------------------------------------------------------- 1 | bad = 0x12g 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-invalid-octal-char.toml: -------------------------------------------------------------------------------- 1 | bad = 0o758 -------------------------------------------------------------------------------- /fixtures/invalid/integer-leading-zero-neg.toml: -------------------------------------------------------------------------------- 1 | leading-zero = -012 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-leading-zero-pos.toml: -------------------------------------------------------------------------------- 1 | leading-zero = +012 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-leading-zero.toml: -------------------------------------------------------------------------------- 1 | leading-zero = 012 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-underscore-after.toml: -------------------------------------------------------------------------------- 1 | bad = 123_ 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-underscore-before.toml: -------------------------------------------------------------------------------- 1 | bad = _123 2 | -------------------------------------------------------------------------------- /fixtures/invalid/integer-underscore-double.toml: -------------------------------------------------------------------------------- 1 | bad = 1__23 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-after-array.toml: -------------------------------------------------------------------------------- 1 | [[agencies]] owner = "S Cjelli" 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-after-table.toml: -------------------------------------------------------------------------------- 1 | [error] this = "should not be here" 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-empty.toml: -------------------------------------------------------------------------------- 1 | = 1 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-hash.toml: -------------------------------------------------------------------------------- 1 | a# = 1 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-newline.toml: -------------------------------------------------------------------------------- 1 | a 2 | = 1 3 | -------------------------------------------------------------------------------- /fixtures/invalid/key-no-eol.toml: -------------------------------------------------------------------------------- 1 | a = 1 b = 2 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-open-bracket.toml: -------------------------------------------------------------------------------- 1 | [abc = 1 2 | -------------------------------------------------------------------------------- /fixtures/invalid/key-single-open-bracket.toml: -------------------------------------------------------------------------------- 1 | [ -------------------------------------------------------------------------------- /fixtures/invalid/key-space.toml: -------------------------------------------------------------------------------- 1 | a b = 1 -------------------------------------------------------------------------------- /fixtures/invalid/key-start-bracket.toml: -------------------------------------------------------------------------------- 1 | [a] 2 | [xyz = 5 3 | [b] 4 | -------------------------------------------------------------------------------- /fixtures/invalid/key-two-equals.toml: -------------------------------------------------------------------------------- 1 | key= = 1 2 | -------------------------------------------------------------------------------- /fixtures/invalid/llbrace.toml: -------------------------------------------------------------------------------- 1 | [ [table]] 2 | -------------------------------------------------------------------------------- /fixtures/invalid/rrbrace.toml: -------------------------------------------------------------------------------- 1 | [[table] ] 2 | -------------------------------------------------------------------------------- /fixtures/invalid/string-bad-byte-escape.toml: -------------------------------------------------------------------------------- 1 | naughty = "\xAg" 2 | -------------------------------------------------------------------------------- /fixtures/invalid/string-bad-escape.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/string-bad-escape.toml -------------------------------------------------------------------------------- /fixtures/invalid/string-bad-surrogate.toml: -------------------------------------------------------------------------------- 1 | notgood = "a\uDCFF" 2 | 3 | -------------------------------------------------------------------------------- /fixtures/invalid/string-bad-uni-esc.toml: -------------------------------------------------------------------------------- 1 | str = "val\ue" 2 | -------------------------------------------------------------------------------- /fixtures/invalid/string-byte-escapes.toml: -------------------------------------------------------------------------------- 1 | answer = "\x33" 2 | -------------------------------------------------------------------------------- /fixtures/invalid/string-no-close.toml: -------------------------------------------------------------------------------- 1 | no-ending-quote = "One time, at band camp 2 | -------------------------------------------------------------------------------- /fixtures/invalid/table-array-implicit.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/table-array-implicit.toml -------------------------------------------------------------------------------- /fixtures/invalid/table-array-malformed-bracket.toml: -------------------------------------------------------------------------------- 1 | [[albums] 2 | name = "Born to Run" 3 | -------------------------------------------------------------------------------- /fixtures/invalid/table-array-malformed-empty.toml: -------------------------------------------------------------------------------- 1 | [[]] 2 | name = "Born to Run" 3 | -------------------------------------------------------------------------------- /fixtures/invalid/table-empty.toml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /fixtures/invalid/table-nested-brackets-close.toml: -------------------------------------------------------------------------------- 1 | [a]b] 2 | zyx = 42 3 | -------------------------------------------------------------------------------- /fixtures/invalid/table-nested-brackets-open.toml: -------------------------------------------------------------------------------- 1 | [a[b] 2 | zyx = 42 3 | -------------------------------------------------------------------------------- /fixtures/invalid/table-whitespace.toml: -------------------------------------------------------------------------------- 1 | [invalid key] -------------------------------------------------------------------------------- /fixtures/invalid/table-with-pound.toml: -------------------------------------------------------------------------------- 1 | [key#group] 2 | answer = 42 -------------------------------------------------------------------------------- /fixtures/invalid/text-after-array-entries.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/text-after-array-entries.toml -------------------------------------------------------------------------------- /fixtures/invalid/text-after-integer.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/text-after-integer.toml -------------------------------------------------------------------------------- /fixtures/invalid/text-after-string.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/text-after-string.toml -------------------------------------------------------------------------------- /fixtures/invalid/text-after-table.toml: -------------------------------------------------------------------------------- 1 | [error] this shouldn't be here 2 | -------------------------------------------------------------------------------- /fixtures/invalid/text-before-array-separator.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/text-before-array-separator.toml -------------------------------------------------------------------------------- /fixtures/invalid/text-in-array.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/invalid/text-in-array.toml -------------------------------------------------------------------------------- /fixtures/valid/array-empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/array-empty.json -------------------------------------------------------------------------------- /fixtures/valid/array-empty.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/array-empty.toml -------------------------------------------------------------------------------- /fixtures/valid/array-nospaces.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/array-nospaces.json -------------------------------------------------------------------------------- /fixtures/valid/array-nospaces.toml: -------------------------------------------------------------------------------- 1 | ints = [1,2,3] 2 | -------------------------------------------------------------------------------- /fixtures/valid/arrays-hetergeneous.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/arrays-hetergeneous.json -------------------------------------------------------------------------------- /fixtures/valid/arrays-hetergeneous.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/arrays-hetergeneous.toml -------------------------------------------------------------------------------- /fixtures/valid/arrays-nested.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/arrays-nested.json -------------------------------------------------------------------------------- /fixtures/valid/arrays-nested.toml: -------------------------------------------------------------------------------- 1 | nest = [["a"], ["b"]] 2 | -------------------------------------------------------------------------------- /fixtures/valid/arrays.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/arrays.json -------------------------------------------------------------------------------- /fixtures/valid/arrays.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/arrays.toml -------------------------------------------------------------------------------- /fixtures/valid/bool.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/bool.json -------------------------------------------------------------------------------- /fixtures/valid/bool.toml: -------------------------------------------------------------------------------- 1 | t = true 2 | f = false 3 | -------------------------------------------------------------------------------- /fixtures/valid/comments-at-eof.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/comments-at-eof.json -------------------------------------------------------------------------------- /fixtures/valid/comments-at-eof.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/comments-at-eof.toml -------------------------------------------------------------------------------- /fixtures/valid/comments-at-eof2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/comments-at-eof2.json -------------------------------------------------------------------------------- /fixtures/valid/comments-at-eof2.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/comments-at-eof2.toml -------------------------------------------------------------------------------- /fixtures/valid/comments-everywhere.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/comments-everywhere.json -------------------------------------------------------------------------------- /fixtures/valid/comments-everywhere.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/comments-everywhere.toml -------------------------------------------------------------------------------- /fixtures/valid/datetime.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/datetime.json -------------------------------------------------------------------------------- /fixtures/valid/datetime.toml: -------------------------------------------------------------------------------- 1 | bestdayever = 1987-07-05T17:45:00Z 2 | -------------------------------------------------------------------------------- /fixtures/valid/empty.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /fixtures/valid/empty.toml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fixtures/valid/example.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/example.json -------------------------------------------------------------------------------- /fixtures/valid/example.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/example.toml -------------------------------------------------------------------------------- /fixtures/valid/float-exponent.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/float-exponent.json -------------------------------------------------------------------------------- /fixtures/valid/float-exponent.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/float-exponent.toml -------------------------------------------------------------------------------- /fixtures/valid/float-underscore.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/float-underscore.json -------------------------------------------------------------------------------- /fixtures/valid/float-underscore.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/float-underscore.toml -------------------------------------------------------------------------------- /fixtures/valid/float.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/float.json -------------------------------------------------------------------------------- /fixtures/valid/float.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/float.toml -------------------------------------------------------------------------------- /fixtures/valid/implicit-and-explicit-after.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/implicit-and-explicit-after.json -------------------------------------------------------------------------------- /fixtures/valid/implicit-and-explicit-after.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/implicit-and-explicit-after.toml -------------------------------------------------------------------------------- /fixtures/valid/implicit-and-explicit-before.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/implicit-and-explicit-before.json -------------------------------------------------------------------------------- /fixtures/valid/implicit-and-explicit-before.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/implicit-and-explicit-before.toml -------------------------------------------------------------------------------- /fixtures/valid/implicit-groups.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/implicit-groups.json -------------------------------------------------------------------------------- /fixtures/valid/implicit-groups.toml: -------------------------------------------------------------------------------- 1 | [a.b.c] 2 | answer = 42 3 | -------------------------------------------------------------------------------- /fixtures/valid/inline-table.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/inline-table.json -------------------------------------------------------------------------------- /fixtures/valid/inline-table.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/inline-table.toml -------------------------------------------------------------------------------- /fixtures/valid/integer-underscore.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/integer-underscore.json -------------------------------------------------------------------------------- /fixtures/valid/integer-underscore.toml: -------------------------------------------------------------------------------- 1 | kilo = 1_000 2 | -------------------------------------------------------------------------------- /fixtures/valid/integer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/integer.json -------------------------------------------------------------------------------- /fixtures/valid/integer.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/integer.toml -------------------------------------------------------------------------------- /fixtures/valid/key-equals-nospace.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/key-equals-nospace.json -------------------------------------------------------------------------------- /fixtures/valid/key-equals-nospace.toml: -------------------------------------------------------------------------------- 1 | answer=42 2 | -------------------------------------------------------------------------------- /fixtures/valid/key-numeric.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/key-numeric.json -------------------------------------------------------------------------------- /fixtures/valid/key-numeric.toml: -------------------------------------------------------------------------------- 1 | 1 = 1 2 | -------------------------------------------------------------------------------- /fixtures/valid/key-space.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/key-space.json -------------------------------------------------------------------------------- /fixtures/valid/key-space.toml: -------------------------------------------------------------------------------- 1 | "a b" = 1 2 | -------------------------------------------------------------------------------- /fixtures/valid/key-special-chars.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/key-special-chars.json -------------------------------------------------------------------------------- /fixtures/valid/key-special-chars.toml: -------------------------------------------------------------------------------- 1 | "~!@$^&*()_+-`1234567890[]|/?><.,;:'" = 1 2 | -------------------------------------------------------------------------------- /fixtures/valid/long-float.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/long-float.json -------------------------------------------------------------------------------- /fixtures/valid/long-float.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/long-float.toml -------------------------------------------------------------------------------- /fixtures/valid/long-integer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/long-integer.json -------------------------------------------------------------------------------- /fixtures/valid/long-integer.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/long-integer.toml -------------------------------------------------------------------------------- /fixtures/valid/multiline-string.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/multiline-string.json -------------------------------------------------------------------------------- /fixtures/valid/multiline-string.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/multiline-string.toml -------------------------------------------------------------------------------- /fixtures/valid/raw-multiline-string.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/raw-multiline-string.json -------------------------------------------------------------------------------- /fixtures/valid/raw-multiline-string.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/raw-multiline-string.toml -------------------------------------------------------------------------------- /fixtures/valid/raw-string.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/raw-string.json -------------------------------------------------------------------------------- /fixtures/valid/raw-string.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/raw-string.toml -------------------------------------------------------------------------------- /fixtures/valid/string-empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-empty.json -------------------------------------------------------------------------------- /fixtures/valid/string-empty.toml: -------------------------------------------------------------------------------- 1 | answer = "" 2 | -------------------------------------------------------------------------------- /fixtures/valid/string-escapes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-escapes.json -------------------------------------------------------------------------------- /fixtures/valid/string-escapes.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-escapes.toml -------------------------------------------------------------------------------- /fixtures/valid/string-nl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-nl.json -------------------------------------------------------------------------------- /fixtures/valid/string-nl.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-nl.toml -------------------------------------------------------------------------------- /fixtures/valid/string-simple.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-simple.json -------------------------------------------------------------------------------- /fixtures/valid/string-simple.toml: -------------------------------------------------------------------------------- 1 | answer = "You are not drinking enough whisky." 2 | -------------------------------------------------------------------------------- /fixtures/valid/string-with-pound.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-with-pound.json -------------------------------------------------------------------------------- /fixtures/valid/string-with-pound.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/string-with-pound.toml -------------------------------------------------------------------------------- /fixtures/valid/table-array-implicit.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-implicit.json -------------------------------------------------------------------------------- /fixtures/valid/table-array-implicit.toml: -------------------------------------------------------------------------------- 1 | [[albums.songs]] 2 | name = "Glory Days" 3 | -------------------------------------------------------------------------------- /fixtures/valid/table-array-many.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-many.json -------------------------------------------------------------------------------- /fixtures/valid/table-array-many.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-many.toml -------------------------------------------------------------------------------- /fixtures/valid/table-array-nest.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-nest.json -------------------------------------------------------------------------------- /fixtures/valid/table-array-nest.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-nest.toml -------------------------------------------------------------------------------- /fixtures/valid/table-array-one.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-one.json -------------------------------------------------------------------------------- /fixtures/valid/table-array-one.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-array-one.toml -------------------------------------------------------------------------------- /fixtures/valid/table-empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": {} 3 | } 4 | -------------------------------------------------------------------------------- /fixtures/valid/table-empty.toml: -------------------------------------------------------------------------------- 1 | [a] 2 | -------------------------------------------------------------------------------- /fixtures/valid/table-no-eol.json: -------------------------------------------------------------------------------- 1 | { "table": {} } 2 | -------------------------------------------------------------------------------- /fixtures/valid/table-no-eol.toml: -------------------------------------------------------------------------------- 1 | [table] -------------------------------------------------------------------------------- /fixtures/valid/table-sub-empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-sub-empty.json -------------------------------------------------------------------------------- /fixtures/valid/table-sub-empty.toml: -------------------------------------------------------------------------------- 1 | [a] 2 | [a.b] 3 | -------------------------------------------------------------------------------- /fixtures/valid/table-whitespace.json: -------------------------------------------------------------------------------- 1 | { 2 | "valid key": {} 3 | } 4 | -------------------------------------------------------------------------------- /fixtures/valid/table-whitespace.toml: -------------------------------------------------------------------------------- 1 | ["valid key"] 2 | -------------------------------------------------------------------------------- /fixtures/valid/table-with-literal-string.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-with-literal-string.json -------------------------------------------------------------------------------- /fixtures/valid/table-with-literal-string.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-with-literal-string.toml -------------------------------------------------------------------------------- /fixtures/valid/table-with-pound.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-with-pound.json -------------------------------------------------------------------------------- /fixtures/valid/table-with-pound.toml: -------------------------------------------------------------------------------- 1 | ["key#group"] 2 | answer = 42 3 | -------------------------------------------------------------------------------- /fixtures/valid/table-with-single-quotes.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-with-single-quotes.json -------------------------------------------------------------------------------- /fixtures/valid/table-with-single-quotes.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/table-with-single-quotes.toml -------------------------------------------------------------------------------- /fixtures/valid/unicode-escape.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/unicode-escape.json -------------------------------------------------------------------------------- /fixtures/valid/unicode-escape.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/unicode-escape.toml -------------------------------------------------------------------------------- /fixtures/valid/unicode-literal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/unicode-literal.json -------------------------------------------------------------------------------- /fixtures/valid/unicode-literal.toml: -------------------------------------------------------------------------------- 1 | answer = "δ" 2 | -------------------------------------------------------------------------------- /fixtures/valid/windows-path.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/fixtures/valid/windows-path.json -------------------------------------------------------------------------------- /fixtures/valid/windows-path.toml: -------------------------------------------------------------------------------- 1 | foo-crate = { path = "C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\cargo-edit-test.YizxPxxElXn9" } -------------------------------------------------------------------------------- /regressions/104.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/regressions/104.toml -------------------------------------------------------------------------------- /regressions/README.md: -------------------------------------------------------------------------------- 1 | Input and expected output files for regression tests. 2 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/rustfmt.toml -------------------------------------------------------------------------------- /src/fmt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/src/fmt.rs -------------------------------------------------------------------------------- /src/fuzz.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/src/fuzz.rs -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/src/main.rs -------------------------------------------------------------------------------- /src/sort.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/src/sort.rs -------------------------------------------------------------------------------- /src/test_utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/src/test_utils.rs -------------------------------------------------------------------------------- /tomlfmt.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevinR528/cargo-sort/HEAD/tomlfmt.toml --------------------------------------------------------------------------------