Skip to content

Commit

Permalink
Move from pedantic to lints package (#102)
Browse files Browse the repository at this point in the history
Fix violation of `prefer_function_declarations_over_variables`.

Ignore `constant_identifier_names` in `level.dart` since fixing the
violations would be a breaking change.
  • Loading branch information
natebosch authored Jul 22, 2021
1 parent 9d9fd5a commit 575781e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.0.2-dev

## 1.0.1

* List log levels in README.
Expand All @@ -9,7 +11,7 @@
## 1.0.0-nullsafety.0

* Migrate to null safety.
* Removed the deprecated `LoggerHandler` typedef.
* Removed the deprecated `LoggerHandler` typedef.

## 0.11.4

Expand Down
8 changes: 2 additions & 6 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
include: package:pedantic/analysis_options.yaml
include: package:lints/recommended.yaml
analyzer:
strong-mode:
implicit-casts: false
errors:
unused_element: error
unused_import: error
unused_local_variable: error
dead_code: error

linter:
rules:
- annotate_overrides
Expand Down
2 changes: 2 additions & 0 deletions lib/src/level.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// ignore_for_file: constant_identifier_names

/// [Level]s to control logging output. Logging can be enabled to include all
/// levels above certain [Level]. [Level]s are ordered using an integer
/// value [Level.value]. The predefined [Level] constants below are sorted as
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: logging
version: 1.0.1
version: 1.0.2-dev

description: >-
Provides APIs for debugging and error logging. This library introduces
Expand All @@ -11,5 +11,5 @@ environment:
sdk: ">=2.12.0 <3.0.0"

dev_dependencies:
pedantic: ^1.10.0
lints: ^1.0.0
test: ^1.16.0
2 changes: 1 addition & 1 deletion test/logging_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ void main() {
});

var callCount = 0;
var myClosure = () => '${++callCount}';
String myClosure() => '${++callCount}';

root.info(myClosure);
root.finer(myClosure); // Should not get evaluated.
Expand Down

0 comments on commit 575781e

Please sign in to comment.