Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: custom_lint_workspace

packages:
- packages/**
- packages/custom_lint*
- packages/custom_lint*/example**
- packages/lint_visitor_generator
4 changes: 4 additions & 0 deletions packages/custom_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased patch

- Support analyzer 7.0.0

## 0.7.0 - 2024-10-27

- `custom_lint --fix` and the generated "Fix all <code>" assists
Expand Down
4 changes: 2 additions & 2 deletions packages/custom_lint/example/example_lint/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
analyzer: ">=5.12.0 <7.0.0"
analyzer_plugin: ^0.11.2
analyzer: ^7.0.0
analyzer_plugin: ^0.12.0
custom_lint_builder:
path: ../../../custom_lint_builder

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# melos_managed_dependency_overrides: custom_lint,custom_lint_builder,custom_lint_core
# melos_managed_dependency_overrides: custom_lint,custom_lint_builder,custom_lint_core,custom_lint_visitor
dependency_overrides:
custom_lint:
path: ../../../custom_lint
path: ../..
custom_lint_builder:
path: ../../../custom_lint_builder
custom_lint_core:
Expand Down
4 changes: 2 additions & 2 deletions packages/custom_lint/example/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# melos_managed_dependency_overrides: custom_lint,custom_lint_builder,custom_lint_core,custom_lint_example_lint
# melos_managed_dependency_overrides: custom_lint,custom_lint_builder,custom_lint_core,custom_lint_example_lint,custom_lint_visitor
dependency_overrides:
custom_lint:
path: ../../custom_lint
path: ..
custom_lint_builder:
path: ../../custom_lint_builder
custom_lint_core:
Expand Down
4 changes: 2 additions & 2 deletions packages/custom_lint/lib/src/output/render_lints.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ void renderLints(
// Sort errors by severity, file, line, column, code, message
// if the output format requires it
errors = errors.sorted((a, b) {
final severityCompare = -AnalysisErrorSeverity.VALUES
final severityCompare = -AnalysisErrorSeverity.values
.indexOf(a.severity)
.compareTo(AnalysisErrorSeverity.VALUES.indexOf(b.severity));
.compareTo(AnalysisErrorSeverity.values.indexOf(b.severity));
if (severityCompare != 0) return severityCompare;

final fileCompare =
Expand Down
4 changes: 1 addition & 3 deletions packages/custom_lint/lib/src/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class CustomLintRunner {

var _closed = false;

late final _sdkPath = getSdkPath();

/// Starts the plugin and sends the necessary requests for initializing it.
late final initialize = Future(() async {
_lintSubscription = channel.lints.listen((event) {
Expand All @@ -36,7 +34,7 @@ class CustomLintRunner {
await channel.sendRequest(
PluginVersionCheckParams(
'',
_sdkPath,
sdkPath,
_analyzerPluginProtocolVersion,
),
);
Expand Down
Loading
Loading