lintrunner 0.12.4__tar.gz → 0.12.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lintrunner might be problematic. Click here for more details.

Files changed (67) hide show
  1. {lintrunner-0.12.4 → lintrunner-0.12.5}/.github/workflows/Lint.yml +2 -0
  2. {lintrunner-0.12.4 → lintrunner-0.12.5}/CHANGELOG.md +6 -0
  3. {lintrunner-0.12.4 → lintrunner-0.12.5}/Cargo.lock +61 -81
  4. {lintrunner-0.12.4 → lintrunner-0.12.5}/Cargo.toml +1 -1
  5. {lintrunner-0.12.4 → lintrunner-0.12.5}/PKG-INFO +1 -1
  6. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/git.rs +1 -1
  7. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/lib.rs +3 -7
  8. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/main.rs +12 -2
  9. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/path.rs +2 -2
  10. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/persistent_data.rs +4 -4
  11. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/rage.rs +26 -1
  12. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/render.rs +1 -1
  13. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/testing.rs +3 -3
  14. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/integration_test.rs +2 -2
  15. {lintrunner-0.12.4 → lintrunner-0.12.5}/.github/workflows/CI.yml +0 -0
  16. {lintrunner-0.12.4 → lintrunner-0.12.5}/.gitignore +0 -0
  17. {lintrunner-0.12.4 → lintrunner-0.12.5}/.lintrunner.toml +0 -0
  18. {lintrunner-0.12.4 → lintrunner-0.12.5}/LICENSE +0 -0
  19. {lintrunner-0.12.4 → lintrunner-0.12.5}/README.md +0 -0
  20. {lintrunner-0.12.4 → lintrunner-0.12.5}/cliff.toml +0 -0
  21. {lintrunner-0.12.4 → lintrunner-0.12.5}/do_release.sh +0 -0
  22. {lintrunner-0.12.4 → lintrunner-0.12.5}/examples/config_example.toml +0 -0
  23. {lintrunner-0.12.4 → lintrunner-0.12.5}/examples/flake8_linter.py +0 -0
  24. {lintrunner-0.12.4 → lintrunner-0.12.5}/examples/rustfmt_linter.py +0 -0
  25. {lintrunner-0.12.4 → lintrunner-0.12.5}/pyproject.toml +0 -0
  26. {lintrunner-0.12.4 → lintrunner-0.12.5}/rustfmt.toml +0 -0
  27. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/init.rs +0 -0
  28. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/lint_config.rs +0 -0
  29. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/lint_message.rs +0 -0
  30. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/linter.rs +0 -0
  31. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/log_utils.rs +0 -0
  32. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/sapling.rs +0 -0
  33. {lintrunner-0.12.4 → lintrunner-0.12.5}/src/version_control.rs +0 -0
  34. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/fixtures/fake_source_file.rs +0 -0
  35. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__changed_init_causes_warning_1.snap +0 -0
  36. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__changed_init_causes_warning_2.snap +0 -0
  37. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__duplicate_code_fails.snap +0 -0
  38. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__empty_command_fails.snap +0 -0
  39. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__excluding_dryrun_fails.snap +0 -0
  40. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__format_command_doesnt_use_nonformat_linter.snap +0 -0
  41. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__git_head_files.snap +0 -0
  42. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__git_no_changes.snap +0 -0
  43. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__init_suppresses_warning.snap +0 -0
  44. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__invalid_args.snap +0 -0
  45. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__invalid_config_fails.snap +0 -0
  46. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__invalid_paths_cmd_and_from.snap +0 -0
  47. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__invalid_paths_cmd_and_specified_paths.snap +0 -0
  48. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__lint_with_no_linters.snap +0 -0
  49. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__linter_hard_failure_is_caught.snap +0 -0
  50. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__linter_nonexistent_command.snap +0 -0
  51. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__linter_providing_nonexistent_path_degrades_gracefully.snap +0 -0
  52. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__linter_replacement_trailing_newlines.snap +0 -0
  53. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__no_op_config_succeeds.snap +0 -0
  54. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__rage_command_output.snap +0 -0
  55. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter.snap +0 -0
  56. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter_fails_on_nonexistent_file.snap +0 -0
  57. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter_fake_second_config.snap +0 -0
  58. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter_oneline.snap +0 -0
  59. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter_only_under_dir.snap +0 -0
  60. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter_replacement_message.snap +0 -0
  61. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__simple_linter_two_configs.snap +0 -0
  62. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__skip_nonexistent_linter.snap +0 -0
  63. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__take_nonexistent_linter.snap +0 -0
  64. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__tee_json.snap +0 -0
  65. {lintrunner-0.12.4 → lintrunner-0.12.5}/tests/snapshots/integration_test__unknown_config_fails.snap +0 -0
  66. {lintrunner-0.12.4 → lintrunner-0.12.5}/tools/convert_to_sarif.py +0 -0
  67. {lintrunner-0.12.4 → lintrunner-0.12.5}/tools/convert_to_sarif_test.py +0 -0
@@ -57,3 +57,5 @@ jobs:
57
57
  sarif_file: lintrunner.sarif
58
58
  category: lintrunner
59
59
  checkout_path: ${{ github.workspace }}
60
+ - name: Run Clippy
61
+ run: cargo clippy -- -D warnings --verbose
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.12.5] - 2024-04-09
6
+
7
+ ### Features
8
+
9
+ - Add gist/pastry upload to lintrunner rage ([bd224ae](https://github.com/suo/lintrunner/commit/bd224aefdc5144cc85276695cd4fabf170f183a0))
10
+
5
11
  ## [0.12.1] - 2024-02-10
6
12
 
7
13
  ### Bug Fixes
@@ -4,9 +4,9 @@ version = 3
4
4
 
5
5
  [[package]]
6
6
  name = "aho-corasick"
7
- version = "1.1.2"
7
+ version = "1.1.3"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
9
+ checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
10
10
  dependencies = [
11
11
  "memchr",
12
12
  ]
@@ -87,9 +87,9 @@ dependencies = [
87
87
 
88
88
  [[package]]
89
89
  name = "autocfg"
90
- version = "1.1.0"
90
+ version = "1.2.0"
91
91
  source = "registry+https://github.com/rust-lang/crates.io-index"
92
- checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
92
+ checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
93
93
 
94
94
  [[package]]
95
95
  name = "bitflags"
@@ -138,9 +138,9 @@ dependencies = [
138
138
 
139
139
  [[package]]
140
140
  name = "bumpalo"
141
- version = "3.15.4"
141
+ version = "3.16.0"
142
142
  source = "registry+https://github.com/rust-lang/crates.io-index"
143
- checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa"
143
+ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
144
144
 
145
145
  [[package]]
146
146
  name = "bytemuck"
@@ -150,9 +150,9 @@ checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15"
150
150
 
151
151
  [[package]]
152
152
  name = "cc"
153
- version = "1.0.90"
153
+ version = "1.0.92"
154
154
  source = "registry+https://github.com/rust-lang/crates.io-index"
155
- checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
155
+ checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41"
156
156
 
157
157
  [[package]]
158
158
  name = "cfg-if"
@@ -162,9 +162,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
162
162
 
163
163
  [[package]]
164
164
  name = "chrono"
165
- version = "0.4.35"
165
+ version = "0.4.37"
166
166
  source = "registry+https://github.com/rust-lang/crates.io-index"
167
- checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a"
167
+ checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e"
168
168
  dependencies = [
169
169
  "android-tzdata",
170
170
  "iana-time-zone",
@@ -352,9 +352,9 @@ dependencies = [
352
352
 
353
353
  [[package]]
354
354
  name = "fastrand"
355
- version = "2.0.1"
355
+ version = "2.0.2"
356
356
  source = "registry+https://github.com/rust-lang/crates.io-index"
357
- checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
357
+ checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984"
358
358
 
359
359
  [[package]]
360
360
  name = "fern"
@@ -392,9 +392,9 @@ dependencies = [
392
392
 
393
393
  [[package]]
394
394
  name = "getrandom"
395
- version = "0.2.12"
395
+ version = "0.2.14"
396
396
  source = "registry+https://github.com/rust-lang/crates.io-index"
397
- checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
397
+ checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
398
398
  dependencies = [
399
399
  "cfg-if",
400
400
  "libc",
@@ -475,9 +475,9 @@ dependencies = [
475
475
 
476
476
  [[package]]
477
477
  name = "indexmap"
478
- version = "2.2.5"
478
+ version = "2.2.6"
479
479
  source = "registry+https://github.com/rust-lang/crates.io-index"
480
- checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
480
+ checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
481
481
  dependencies = [
482
482
  "equivalent",
483
483
  "hashbrown 0.14.3",
@@ -503,9 +503,9 @@ checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb"
503
503
 
504
504
  [[package]]
505
505
  name = "insta"
506
- version = "1.36.1"
506
+ version = "1.38.0"
507
507
  source = "registry+https://github.com/rust-lang/crates.io-index"
508
- checksum = "0a7c22c4d34ef4788c351e971c52bfdfe7ea2766f8c5466bc175dd46e52ac22e"
508
+ checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc"
509
509
  dependencies = [
510
510
  "console",
511
511
  "lazy_static",
@@ -514,7 +514,6 @@ dependencies = [
514
514
  "pest_derive",
515
515
  "serde",
516
516
  "similar",
517
- "yaml-rust",
518
517
  ]
519
518
 
520
519
  [[package]]
@@ -539,9 +538,9 @@ dependencies = [
539
538
 
540
539
  [[package]]
541
540
  name = "itoa"
542
- version = "1.0.10"
541
+ version = "1.0.11"
543
542
  source = "registry+https://github.com/rust-lang/crates.io-index"
544
- checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
543
+ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
545
544
 
546
545
  [[package]]
547
546
  name = "js-sys"
@@ -566,13 +565,12 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
566
565
 
567
566
  [[package]]
568
567
  name = "libredox"
569
- version = "0.0.1"
568
+ version = "0.1.3"
570
569
  source = "registry+https://github.com/rust-lang/crates.io-index"
571
- checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"
570
+ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
572
571
  dependencies = [
573
572
  "bitflags 2.5.0",
574
573
  "libc",
575
- "redox_syscall",
576
574
  ]
577
575
 
578
576
  [[package]]
@@ -583,7 +581,7 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
583
581
 
584
582
  [[package]]
585
583
  name = "lintrunner"
586
- version = "0.12.4"
584
+ version = "0.12.5"
587
585
  dependencies = [
588
586
  "anyhow",
589
587
  "assert_cmd",
@@ -625,9 +623,9 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
625
623
 
626
624
  [[package]]
627
625
  name = "memchr"
628
- version = "2.7.1"
626
+ version = "2.7.2"
629
627
  source = "registry+https://github.com/rust-lang/crates.io-index"
630
- checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
628
+ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
631
629
 
632
630
  [[package]]
633
631
  name = "num-traits"
@@ -658,9 +656,9 @@ checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
658
656
 
659
657
  [[package]]
660
658
  name = "pear"
661
- version = "0.2.8"
659
+ version = "0.2.9"
662
660
  source = "registry+https://github.com/rust-lang/crates.io-index"
663
- checksum = "4ccca0f6c17acc81df8e242ed473ec144cbf5c98037e69aa6d144780aad103c8"
661
+ checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467"
664
662
  dependencies = [
665
663
  "inlinable_string",
666
664
  "pear_codegen",
@@ -669,21 +667,21 @@ dependencies = [
669
667
 
670
668
  [[package]]
671
669
  name = "pear_codegen"
672
- version = "0.2.8"
670
+ version = "0.2.9"
673
671
  source = "registry+https://github.com/rust-lang/crates.io-index"
674
- checksum = "2e22670e8eb757cff11d6c199ca7b987f352f0346e0be4dd23869ec72cb53c77"
672
+ checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147"
675
673
  dependencies = [
676
674
  "proc-macro2",
677
675
  "proc-macro2-diagnostics",
678
676
  "quote",
679
- "syn 2.0.53",
677
+ "syn 2.0.58",
680
678
  ]
681
679
 
682
680
  [[package]]
683
681
  name = "pest"
684
- version = "2.7.8"
682
+ version = "2.7.9"
685
683
  source = "registry+https://github.com/rust-lang/crates.io-index"
686
- checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8"
684
+ checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95"
687
685
  dependencies = [
688
686
  "memchr",
689
687
  "thiserror",
@@ -692,9 +690,9 @@ dependencies = [
692
690
 
693
691
  [[package]]
694
692
  name = "pest_derive"
695
- version = "2.7.8"
693
+ version = "2.7.9"
696
694
  source = "registry+https://github.com/rust-lang/crates.io-index"
697
- checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026"
695
+ checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c"
698
696
  dependencies = [
699
697
  "pest",
700
698
  "pest_generator",
@@ -702,22 +700,22 @@ dependencies = [
702
700
 
703
701
  [[package]]
704
702
  name = "pest_generator"
705
- version = "2.7.8"
703
+ version = "2.7.9"
706
704
  source = "registry+https://github.com/rust-lang/crates.io-index"
707
- checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80"
705
+ checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd"
708
706
  dependencies = [
709
707
  "pest",
710
708
  "pest_meta",
711
709
  "proc-macro2",
712
710
  "quote",
713
- "syn 2.0.53",
711
+ "syn 2.0.58",
714
712
  ]
715
713
 
716
714
  [[package]]
717
715
  name = "pest_meta"
718
- version = "2.7.8"
716
+ version = "2.7.9"
719
717
  source = "registry+https://github.com/rust-lang/crates.io-index"
720
- checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293"
718
+ checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca"
721
719
  dependencies = [
722
720
  "once_cell",
723
721
  "pest",
@@ -792,7 +790,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
792
790
  dependencies = [
793
791
  "proc-macro2",
794
792
  "quote",
795
- "syn 2.0.53",
793
+ "syn 2.0.58",
796
794
  "version_check",
797
795
  "yansi",
798
796
  ]
@@ -806,20 +804,11 @@ dependencies = [
806
804
  "proc-macro2",
807
805
  ]
808
806
 
809
- [[package]]
810
- name = "redox_syscall"
811
- version = "0.4.1"
812
- source = "registry+https://github.com/rust-lang/crates.io-index"
813
- checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
814
- dependencies = [
815
- "bitflags 1.3.2",
816
- ]
817
-
818
807
  [[package]]
819
808
  name = "redox_users"
820
- version = "0.4.4"
809
+ version = "0.4.5"
821
810
  source = "registry+https://github.com/rust-lang/crates.io-index"
822
- checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"
811
+ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
823
812
  dependencies = [
824
813
  "getrandom",
825
814
  "libredox",
@@ -828,9 +817,9 @@ dependencies = [
828
817
 
829
818
  [[package]]
830
819
  name = "regex"
831
- version = "1.10.3"
820
+ version = "1.10.4"
832
821
  source = "registry+https://github.com/rust-lang/crates.io-index"
833
- checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
822
+ checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
834
823
  dependencies = [
835
824
  "aho-corasick",
836
825
  "memchr",
@@ -851,15 +840,15 @@ dependencies = [
851
840
 
852
841
  [[package]]
853
842
  name = "regex-syntax"
854
- version = "0.8.2"
843
+ version = "0.8.3"
855
844
  source = "registry+https://github.com/rust-lang/crates.io-index"
856
- checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
845
+ checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
857
846
 
858
847
  [[package]]
859
848
  name = "rustix"
860
- version = "0.38.31"
849
+ version = "0.38.32"
861
850
  source = "registry+https://github.com/rust-lang/crates.io-index"
862
- checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"
851
+ checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89"
863
852
  dependencies = [
864
853
  "bitflags 2.5.0",
865
854
  "errno",
@@ -891,14 +880,14 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
891
880
  dependencies = [
892
881
  "proc-macro2",
893
882
  "quote",
894
- "syn 2.0.53",
883
+ "syn 2.0.58",
895
884
  ]
896
885
 
897
886
  [[package]]
898
887
  name = "serde_json"
899
- version = "1.0.114"
888
+ version = "1.0.115"
900
889
  source = "registry+https://github.com/rust-lang/crates.io-index"
901
- checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
890
+ checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd"
902
891
  dependencies = [
903
892
  "itoa",
904
893
  "ryu",
@@ -933,9 +922,9 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
933
922
 
934
923
  [[package]]
935
924
  name = "similar"
936
- version = "2.4.0"
925
+ version = "2.5.0"
937
926
  source = "registry+https://github.com/rust-lang/crates.io-index"
938
- checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21"
927
+ checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640"
939
928
 
940
929
  [[package]]
941
930
  name = "smawk"
@@ -962,9 +951,9 @@ dependencies = [
962
951
 
963
952
  [[package]]
964
953
  name = "syn"
965
- version = "2.0.53"
954
+ version = "2.0.58"
966
955
  source = "registry+https://github.com/rust-lang/crates.io-index"
967
- checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032"
956
+ checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687"
968
957
  dependencies = [
969
958
  "proc-macro2",
970
959
  "quote",
@@ -1043,7 +1032,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7"
1043
1032
  dependencies = [
1044
1033
  "proc-macro2",
1045
1034
  "quote",
1046
- "syn 2.0.53",
1035
+ "syn 2.0.58",
1047
1036
  ]
1048
1037
 
1049
1038
  [[package]]
@@ -1078,11 +1067,11 @@ dependencies = [
1078
1067
 
1079
1068
  [[package]]
1080
1069
  name = "toml_edit"
1081
- version = "0.22.8"
1070
+ version = "0.22.9"
1082
1071
  source = "registry+https://github.com/rust-lang/crates.io-index"
1083
- checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd"
1072
+ checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4"
1084
1073
  dependencies = [
1085
- "indexmap 2.2.5",
1074
+ "indexmap 2.2.6",
1086
1075
  "serde",
1087
1076
  "serde_spanned",
1088
1077
  "toml_datetime",
@@ -1170,7 +1159,7 @@ dependencies = [
1170
1159
  "once_cell",
1171
1160
  "proc-macro2",
1172
1161
  "quote",
1173
- "syn 2.0.53",
1162
+ "syn 2.0.58",
1174
1163
  "wasm-bindgen-shared",
1175
1164
  ]
1176
1165
 
@@ -1192,7 +1181,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
1192
1181
  dependencies = [
1193
1182
  "proc-macro2",
1194
1183
  "quote",
1195
- "syn 2.0.53",
1184
+ "syn 2.0.58",
1196
1185
  "wasm-bindgen-backend",
1197
1186
  "wasm-bindgen-shared",
1198
1187
  ]
@@ -1318,15 +1307,6 @@ dependencies = [
1318
1307
  "memchr",
1319
1308
  ]
1320
1309
 
1321
- [[package]]
1322
- name = "yaml-rust"
1323
- version = "0.4.5"
1324
- source = "registry+https://github.com/rust-lang/crates.io-index"
1325
- checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
1326
- dependencies = [
1327
- "linked-hash-map",
1328
- ]
1329
-
1330
1310
  [[package]]
1331
1311
  name = "yansi"
1332
1312
  version = "1.0.1"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "lintrunner"
3
- version = "0.12.4"
3
+ version = "0.12.5"
4
4
  authors = ["Michael Suo <suo@fb.com>"]
5
5
  edition = "2021"
6
6
  description = "A lint running tool and framework."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lintrunner
3
- Version: 0.12.4
3
+ Version: 0.12.5
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -361,7 +361,7 @@ mod tests {
361
361
  }
362
362
 
363
363
  #[test]
364
- fn invalid_get_paths_from_cmd_fails() -> () {
364
+ fn invalid_get_paths_from_cmd_fails() {
365
365
  assert!(get_paths_from_cmd("asoidjfoaisdjf").is_err());
366
366
  assert!(get_paths_from_cmd("false").is_err());
367
367
  }
@@ -42,9 +42,7 @@ fn group_lints_by_file(
42
42
  lints: Vec<LintMessage>,
43
43
  ) {
44
44
  lints.into_iter().fold(all_lints, |acc, lint| {
45
- acc.entry(lint.path.clone())
46
- .or_insert_with(Vec::new)
47
- .push(lint);
45
+ acc.entry(lint.path.clone()).or_default().push(lint);
48
46
  acc
49
47
  });
50
48
  }
@@ -160,6 +158,7 @@ pub fn get_version_control() -> Result<Box<dyn VersionControl>> {
160
158
  Ok(Box::new(sapling::Repo::new()?))
161
159
  }
162
160
 
161
+ #[allow(clippy::too_many_arguments)]
163
162
  pub fn do_lint(
164
163
  linters: Vec<Linter>,
165
164
  paths_opt: PathsOpt,
@@ -207,10 +206,7 @@ pub fn do_lint(
207
206
 
208
207
  // Sort and unique the files so we pass a consistent ordering to linters
209
208
  if let Some(config_dir) = config_dir {
210
- files = files
211
- .into_iter()
212
- .filter(|path| path.starts_with(&config_dir))
213
- .collect();
209
+ files.retain(|path| path.starts_with(&config_dir));
214
210
  }
215
211
  files.sort();
216
212
  files.dedup();
@@ -141,6 +141,12 @@ enum SubCommand {
141
141
  /// Choose a specific invocation to report on. 0 is the most recent run.
142
142
  #[clap(long, short)]
143
143
  invocation: Option<usize>,
144
+ /// Set to upload the report to github gist (if available)
145
+ #[clap(long, short, action)]
146
+ gist: bool,
147
+ /// Set to upload the report to pastry (if available)
148
+ #[clap(long, short, action)]
149
+ pastry: bool,
144
150
  },
145
151
  }
146
152
 
@@ -172,7 +178,7 @@ fn do_main() -> Result<i32> {
172
178
  // clone split by commas and trim whitespace
173
179
  let config_paths: Vec<String> = args
174
180
  .configs
175
- .split(",")
181
+ .split(',')
176
182
  .map(|path| path.trim().to_string())
177
183
  .collect_vec();
178
184
  // check if first config path exists
@@ -315,7 +321,11 @@ fn do_main() -> Result<i32> {
315
321
  only_lint_under_config_dir,
316
322
  )
317
323
  }
318
- SubCommand::Rage { invocation } => do_rage(&persistent_data_store, invocation),
324
+ SubCommand::Rage {
325
+ invocation,
326
+ gist,
327
+ pastry,
328
+ } => do_rage(&persistent_data_store, invocation, gist, pastry),
319
329
  SubCommand::List => {
320
330
  println!("Available linters:");
321
331
  for linter in &lint_runner_config.linters {
@@ -109,8 +109,8 @@ pub fn path_relative_from(path: &Path, base: &Path) -> Option<PathBuf> {
109
109
  }
110
110
  (None, _) => comps.push(Component::ParentDir),
111
111
  (Some(a), Some(b)) if comps.is_empty() && a == b => (),
112
- (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
113
- (Some(_), Some(b)) if b == Component::ParentDir => return None,
112
+ (Some(a), Some(Component::CurDir)) => comps.push(a),
113
+ (Some(_), Some(Component::ParentDir)) => return None,
114
114
  (Some(a), Some(_)) => {
115
115
  comps.push(Component::ParentDir);
116
116
  for _ in itb {
@@ -72,7 +72,7 @@ impl PersistentDataStore {
72
72
  let runs_dir = config_data_dir.join(RUNS_DIR_NAME);
73
73
  let cur_run_dir = runs_dir.join(cur_run_info.dir_name());
74
74
 
75
- std::fs::create_dir_all(&cur_run_dir)?;
75
+ std::fs::create_dir_all(cur_run_dir)?;
76
76
 
77
77
  PersistentDataStore::clean_old_runs(&runs_dir)?;
78
78
 
@@ -116,10 +116,10 @@ impl PersistentDataStore {
116
116
  std::fs::create_dir(&run_path)?;
117
117
  }
118
118
  let run_info = serde_json::to_string_pretty(&self.cur_run_info)?;
119
- std::fs::write(&run_path.join("run_info.json"), &run_info)?;
119
+ std::fs::write(run_path.join("run_info.json"), run_info)?;
120
120
 
121
121
  let exit_info = serde_json::to_string_pretty(&exit_info)?;
122
- std::fs::write(&run_path.join("exit_info.json"), exit_info)?;
122
+ std::fs::write(run_path.join("exit_info.json"), exit_info)?;
123
123
  Ok(())
124
124
  }
125
125
 
@@ -257,7 +257,7 @@ impl PersistentDataStore {
257
257
  let config_contents = config_contents.extract::<LintRunnerConfig>()?;
258
258
  let path = self.relative_path(CONFIG_DATA_NAME);
259
259
  let serialized_contents = serde_json::to_string_pretty(&config_contents)?;
260
- std::fs::write(path, &serialized_contents)?;
260
+ std::fs::write(path, serialized_contents)?;
261
261
  Ok(())
262
262
  }
263
263
 
@@ -2,6 +2,9 @@ use crate::persistent_data::{PersistentDataStore, RunInfo};
2
2
  use anyhow::{Context, Result};
3
3
  use console::style;
4
4
  use dialoguer::{theme::ColorfulTheme, Select};
5
+ use std::io::Write;
6
+ use std::process::Command;
7
+ use std::process::Stdio;
5
8
 
6
9
  fn select_past_runs(persistent_data_store: &PersistentDataStore) -> Result<Option<RunInfo>> {
7
10
  let runs = persistent_data_store.past_runs()?;
@@ -34,9 +37,22 @@ fn select_past_runs(persistent_data_store: &PersistentDataStore) -> Result<Optio
34
37
  Ok(selection.map(|i| runs.into_iter().nth(i).unwrap().0))
35
38
  }
36
39
 
40
+ fn upload(report: String, cmd: &mut Command) -> Result<()> {
41
+ let mut child = cmd.stdin(Stdio::piped()).spawn()?;
42
+
43
+ if let Some(mut stdin) = child.stdin.take() {
44
+ stdin.write_all(report.as_bytes())?;
45
+ }
46
+
47
+ child.wait()?;
48
+ Ok(())
49
+ }
50
+
37
51
  pub fn do_rage(
38
52
  persistent_data_store: &PersistentDataStore,
39
53
  invocation: Option<usize>,
54
+ gist: bool,
55
+ pastry: bool,
40
56
  ) -> Result<i32> {
41
57
  let run = match invocation {
42
58
  Some(invocation) => Some(persistent_data_store.past_run(invocation)?),
@@ -48,7 +64,16 @@ pub fn do_rage(
48
64
  let report = persistent_data_store
49
65
  .get_run_report(&run)
50
66
  .context("getting selected run report")?;
51
- print!("{}", report);
67
+ if gist {
68
+ upload(
69
+ report.clone(),
70
+ Command::new("gh").args(["gist", "create", "-"]),
71
+ )?;
72
+ } else if pastry {
73
+ upload(report.clone(), &mut Command::new("pastry"))?;
74
+ } else {
75
+ print!("{}", report);
76
+ }
52
77
  }
53
78
  None => {
54
79
  println!("{}", style("Nothing selected, exiting.").yellow());
@@ -225,7 +225,7 @@ fn write_context_diff(stdout: &mut impl Write, original: &str, replacement: &str
225
225
  let diff = TextDiff::from_lines(original, replacement);
226
226
 
227
227
  let mut max_line_number = 1;
228
- for (_, group) in diff.grouped_ops(3).iter().enumerate() {
228
+ for group in diff.grouped_ops(3).iter() {
229
229
  for op in group {
230
230
  for change in diff.iter_inline_changes(op) {
231
231
  let old_line = change.old_index().unwrap_or(0) + 1;
@@ -55,7 +55,7 @@ impl GitCheckout {
55
55
 
56
56
  pub fn checkout_new_branch(&self, branch_name: &str) -> Result<()> {
57
57
  let output = Command::new("git")
58
- .args(&["checkout", "-b", branch_name])
58
+ .args(["checkout", "-b", branch_name])
59
59
  .current_dir(self.root())
60
60
  .output()?;
61
61
  assert!(output.status.success());
@@ -64,7 +64,7 @@ impl GitCheckout {
64
64
 
65
65
  pub fn add(&self, pathspec: &str) -> Result<()> {
66
66
  let output = Command::new("git")
67
- .args(&["add", pathspec])
67
+ .args(["add", pathspec])
68
68
  .current_dir(self.root())
69
69
  .output()?;
70
70
  assert!(output.status.success());
@@ -73,7 +73,7 @@ impl GitCheckout {
73
73
 
74
74
  pub fn commit(&self, message: &str) -> Result<()> {
75
75
  let output = Command::new("git")
76
- .args(&["commit", "-m", message])
76
+ .args(["commit", "-m", message])
77
77
  .current_dir(self.root())
78
78
  .output()?;
79
79
  assert!(output.status.success());
@@ -3,7 +3,7 @@ use assert_cmd::Command;
3
3
  use insta::{assert_snapshot, assert_yaml_snapshot};
4
4
  use lintrunner::lint_message::{LintMessage, LintSeverity};
5
5
  use regex::Regex;
6
- use serde_json;
6
+
7
7
  use std::io::Write;
8
8
 
9
9
  fn assert_output_snapshot(name: &str, cmd: &mut Command) -> Result<()> {
@@ -870,7 +870,7 @@ fn linter_replacement_trailing_newlines() -> Result<()> {
870
870
  "--data-path={}",
871
871
  data_path.path().to_str().unwrap()
872
872
  ));
873
- cmd.arg(format!("--force-color"));
873
+ cmd.arg("--force-color");
874
874
  // Run on a file to ensure that the linter is run.
875
875
  cmd.arg("README.md");
876
876
  cmd.assert().failure();
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes