Sam Rawlins
43e01310a4
analyzer_testing: Rename PubPackageResolutionTest.ignoredErrorCodes to ignoredDiagnosticCodes
...
Change-Id: I0a951ecbf8aa74d1c00df99e0f5bdab84bb00dde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430542
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-23 10:12:18 -07:00
Sam Rawlins
f2d416b866
analyzer: simplify PackageConfigFileBuilder.toContent
...
This API did not exist (was not public) in analyzer 7.4.x, so is safe
to change in 8.0.0.
Change-Id: Ib4a06008b1cdf1be4f33dcb9036ea87b6d258067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430041
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-05-22 10:58:49 -07:00
Sam Rawlins
9d2df84973
analyzer_testing: add more default-ignored codes
...
UNUSED_ELEMENT and UNUSED_FIELD were added to the "ignore list" for
the tests of a dozen lint rules. I think it is pretty harmless to ignore
them by default, and save plugin authors some `// ignore:` comments, or
hand-wringing about how to get rid of an "unused" field in a test which
is needed in order to test an analysis rule.
Change-Id: Ic35fead8a44d8d3341f9e32e92b53610b517edf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430121
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2025-05-22 09:23:50 -07:00
Sam Rawlins
f81079035f
analyzer_testing: Move LintRuleTest and linter's PubPackageResolutionTest
...
Most of the behavior of LintRuleTest is extracted into a public class
in analyzer_testing, AnalysisRuleTest. A little bit of code is left in
LintRuleTest, so that first-party lint rules can be tested by
registering the first-party lint rules. And those lint rules can
declare the `lintRule` that each is concerned with, rather than the
new `analysisRule` getter.
PubPackageResolutionTest is left as private impl, because I think it
may undergo some changes, and we may be merging more shared code, and
the name may change. A few first-party lint rules have tests that
refer to this class, which is OK.
Other than that, no code or behavior changes are in this CL.
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: I447850c438af7d0fe90889d2eaec6f2f8b4f8281
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-20 10:25:50 -07:00
Sam Rawlins
823908a435
Simplify ConfigurationFilesMixin
...
Work towards https://github.com/dart-lang/sdk/issues/55660
This mixin has some members that can be made private, and some that
can be removed.
Removing a `macro` parameter also simplifies things.
Change-Id: Id3b5d33ff66dde0c763499ff183943d72901d395
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429440
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-19 12:44:59 -07:00
Sam Rawlins
e35e665259
analyzer_testing: convert all modifyFile users to modifyFile2
...
This also involves tidying up blaze_watcher_test, in order to
easily get back a File object from a helper method.
Change-Id: If9dc812dc3a97a205dee600b89c3e8490e9efcba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429201
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-05-19 07:11:23 -07:00
Sam Rawlins
750ecda6b3
Remove two underused methods from ResourceProviderMixin
...
Change-Id: I41f288f216e7db5a744d10a38074e104321e49f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-17 10:39:12 -07:00
Sam Rawlins
bd700772ff
analyzer: move testing utilities to analyzer_testing package
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: Iae062d95e5cf3b94b540496242b3627268ac2612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428844
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-05-15 16:28:50 -07:00
Sam Rawlins
c4c9854b9b
analyzer_testing: Move ResourceProviderMixin to analyzer_testing
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: I31932409e495369793dd16c017385c98b86cf44c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427480
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-09 16:56:29 -07:00
Sam Rawlins
2f706c4290
analyzer_testing: move experiments library to analyzer_testing
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: I9c5aa920e9f96f99ea00d6993b5f4dafd415f831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426986
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-07 13:12:13 -07:00
Sam Rawlins
7431e885e8
analyzer_testing: Move in the mock packages.
...
Work towards https://github.com/dart-lang/sdk/issues/55660
Change-Id: Ic789b8347d3bfc71a02af423fbb1a8c58da7b32d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424921
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-05-06 11:32:22 -07:00
Sam Rawlins
4ef2725654
Add an analyzer_testing package
...
We intend to publish and maintain this as a set of testing-related
utilities for the analyzer packages and for analyzer plugins.
Work towards https://github.com/dart-lang/sdk/issues/55660
See the doc: https://docs.google.com/document/d/1jRtd8B1ijPAP6Pz89HRnyIZXw2VMjaZx0vRZTpoNO84/edit?tab=t.0#heading=h.2sz41a544qhi
Change-Id: I2764b1357a932fa955060b26d78038997eaa9536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425080
Reviewed-by: Slava Egorov <vegorov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-05-02 06:58:49 -07:00