Skip to content

Commit

Permalink
style: more linting #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
nyoungstudios committed Sep 24, 2022
1 parent 429d282 commit d505277
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 17 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint

# Run only one workflow at a time on a pr
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
branches: [ main ]
paths:
- 'bin/**'
- 'lib/**'
- 'tests/**.dart'
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'

- uses: dart-lang/[email protected]
with:
sdk: stable

- name: Install dependencies
run: dart pub get

- name: Run linter
run: dart analyze --fatal-infos
2 changes: 1 addition & 1 deletion bin/alfa.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void main(List<String> args) async {

// executes shell command
var streams = await Process.start(executable, arguments, runInShell: true)
.then((Process process) {
.then((process) {
var outStream = stdout.addStream(process.stdout);
var errStream = stderr.addStream(process.stderr);

Expand Down
32 changes: 16 additions & 16 deletions lib/src/schema.dart
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
final configSchema = {
"type": "object",
"patternProperties": {
".*": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {"type": "string"}
'type': 'object',
'patternProperties': {
'.*': {
'type': 'object',
'properties': {
'tags': {
'type': 'array',
'items': {'type': 'string'}
},
"os": {
"type": "array",
"items": {
"type": "string",
"enum": ["macos", "linux"]
'os': {
'type': 'array',
'items': {
'type': 'string',
'enum': ['macos', 'linux']
}
},
"options": {
"type": "array",
"items": {"type": "string"}
'options': {
'type': 'array',
'items': {'type': 'string'}
}
}
}
Expand Down

0 comments on commit d505277

Please sign in to comment.