Skip to content

Commit

Permalink
Merge pull request #18 from pitabwire/renovate/lints-4.x
Browse files Browse the repository at this point in the history
Update dependency lints to v4
  • Loading branch information
pitabwire authored May 14, 2024
2 parents 9854944 + cdda7cc commit 8d9e872
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
strategy:
matrix:
dart_version: [ 2.14,2.15,2.16,2.17,2.18,2.19,3.0,3.1,3.2 ]
dart_version: [ 2.18,2.19,3.0,3.1,3.2,3.3 ]
runs-on: ubuntu-latest
container:
image: dart:${{ matrix.dart_version }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.2.0

- stop supporting dart versions prior to 2.17.0
- switch to using flutter_lint away from lints
- optimize memory usage when declaring binary structure

## 1.1.2

- fix issue related to missing gh permission
Expand Down
50 changes: 24 additions & 26 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# analyzer:
# exclude:
# - path/to/excluded/files/**
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/tools/linter-rules.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
# Additional information about this file can be found at
# https://dart.dev/tools/analysis
4 changes: 3 additions & 1 deletion example/xid_example.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:developer';

import 'package:xid/xid.dart';

void main() {
var xid = Xid();
print('generated id: $xid');
log('generated id: $xid');
}
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ description: |
Xid is a globally unique id generator. Xids are small, fast to generate, sortable,
compact URL-safe string with no configuration or central generator server.
version: 1.1.2
version: 1.2.0
repository: https://github.com/pitabwire/xid
environment:
sdk: ^2.14.4
sdk: ^2.18.0

dev_dependencies:
lints: ^1.0.0
flutter_lints: ^2.0.2
test: ^1.16.0

4 changes: 2 additions & 2 deletions test/xid_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void main() {
0x2d,
0xc9
];
final idString = "9m4e2mr0ui3e8a215n4g";
const idString = "9m4e2mr0ui3e8a215n4g";
test('Encoding works well', () {
expect(base32encode(idBytes), idString.toUpperCase());
expect(Xid.fromString(idString).toBytes(), idBytes);
Expand All @@ -42,7 +42,7 @@ void main() {
0x2d,
0xc9
];
final decodeIdString = "9m4e2mr0ui3e8a215n4g";
const decodeIdString = "9m4e2mr0ui3e8a215n4g";

test('Decoding works well', () {
expect(base32decode(decodeIdString), decodeIdBytes);
Expand Down

0 comments on commit 8d9e872

Please sign in to comment.