-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from Workiva/latest_scip_cli
FEA-3236: Latest scip cli and diagnostic snapshot generation
- Loading branch information
Showing
10 changed files
with
617 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- name: Install scip cli | ||
run: | | ||
bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.3.0/scip-linux-amd64.tar.gz"' | tar xzf - scip | ||
bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.3.3/scip-linux-amd64.tar.gz"' | tar xzf - scip | ||
./scip --version | ||
- uses: dart-lang/setup-dart@v1 | ||
|
@@ -28,50 +28,17 @@ jobs: | |
run: dart pub get | ||
working-directory: ./snapshots/input/basic-project | ||
|
||
- name: dart pub get relationships-project directory | ||
- name: dart pub get diagnostics directory | ||
run: dart pub get | ||
working-directory: ./snapshots/input/relationships-project | ||
working-directory: ./snapshots/input/diagnostics | ||
|
||
- name: Snapshots Diff Check | ||
run: | | ||
dart run scip_dart ./snapshots/input/basic-project | ||
./scip snapshot --to ./snapshots/output/basic-project | ||
if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; | ||
then | ||
echo "No changes to snapshot files" | ||
else | ||
echo | ||
echo "Snapshot diff detected differences, run 'make gen-snaps' to re-generate snapshots" | ||
git status --short ./snapshots/output | ||
echo | ||
exit 1 | ||
fi | ||
snapshots-diagnostics: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install scip cli | ||
run: | | ||
bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.3.0/scip-linux-amd64.tar.gz"' | tar xzf - scip | ||
./scip --version | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: 2.18.7 | ||
- name: pub get scip-dart package | ||
run: dart pub get | ||
|
||
- name: pub get diagnostics directory | ||
run: dart pub get | ||
working-directory: ./snapshots/input/diagnostics | ||
|
||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
|
||
- name: Snapshots Diff Check | ||
run: | | ||
make gen-snap_diagnostics | ||
dart run scip_dart ./snapshots/input/diagnostics | ||
./scip snapshot --to ./snapshots/output/diagnostics | ||
if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; | ||
then | ||
|
@@ -86,7 +53,6 @@ jobs: | |
consumer: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
repo: [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,159 @@ | ||
import 'package:dart_test/other.dart'; | ||
// definition scip-dart pub dart_test 1.0.0 lib/main.dart/ | ||
// definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/ | ||
|
||
/// This is a fib function | ||
/// | ||
/// Takes a number | ||
/// Returns a number | ||
int fib(int n) { | ||
//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/int.dart/int# | ||
// ^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/fib(). | ||
// documentation ```dart | ||
// documentation This is a fib function | ||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/int.dart/int# | ||
//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# | ||
// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). | ||
// documentation | ||
// > ```dart | ||
// > int fib(int n) | ||
// > ``` | ||
// documentation | ||
// > This is a fib function | ||
// > Takes a number | ||
// > Returns a number | ||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# | ||
// ^ definition local 0 | ||
// documentation ```dart | ||
// documentation | ||
// > ```dart | ||
// > int n | ||
// > ``` | ||
if (n <= 1) return 0; | ||
// ^ reference local 0 | ||
return fib(n - 1) + fib(n - 2); | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/fib(). | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). | ||
// ^ reference local 0 | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/fib(). | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). | ||
// ^ reference local 0 | ||
} | ||
|
||
void print_fib(int a) { | ||
// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/print_fib(). | ||
// documentation ```dart | ||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/int.dart/int# | ||
// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). | ||
// documentation | ||
// > ```dart | ||
// > void print_fib(int a) | ||
// > ``` | ||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# | ||
// ^ definition local 1 | ||
// documentation ```dart | ||
// documentation | ||
// > ```dart | ||
// > int a | ||
// > ``` | ||
print(fib(a)); | ||
// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/print.dart/print(). | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/fib(). | ||
// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). | ||
// ^ reference local 1 | ||
} | ||
|
||
final y = 'Hello'; | ||
// ^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/y. | ||
// documentation ```dart | ||
// ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. | ||
// documentation | ||
// > ```dart | ||
// > String y | ||
// > ``` | ||
String capture() { | ||
//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/string.dart/String# | ||
// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/capture(). | ||
// documentation ```dart | ||
//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# | ||
// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). | ||
// documentation | ||
// > ```dart | ||
// > String capture() | ||
// > ``` | ||
return y; | ||
// ^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/y. | ||
// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. | ||
} | ||
|
||
final capture_lambda = () => y; | ||
// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/capture_lambda. | ||
// documentation ```dart | ||
// ^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/y. | ||
// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. | ||
// documentation | ||
// > ```dart | ||
// > String Function() capture_lambda | ||
// > ``` | ||
// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. | ||
|
||
void main() { | ||
// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/main(). | ||
// documentation ```dart | ||
// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). | ||
// documentation | ||
// > ```dart | ||
// > void main() | ||
// > ``` | ||
for (var i = 0; i <= 10; i++) {} | ||
// ^ definition local 2 | ||
// documentation ```dart | ||
// documentation | ||
// > ```dart | ||
// > int i | ||
// > ``` | ||
// ^ reference local 2 | ||
// ^ reference local 2 | ||
|
||
for (var i in [1, 2, 3]) { | ||
// ^ definition local 3 | ||
// documentation ```dart | ||
// documentation | ||
// > ```dart | ||
// > int i | ||
// > ``` | ||
print(i); | ||
// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/print.dart/print(). | ||
// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). | ||
// ^ reference local 3 | ||
} | ||
|
||
var a = 0; | ||
// ^ definition local 4 | ||
// documentation ```dart | ||
// documentation | ||
// > ```dart | ||
// > int a | ||
// > ``` | ||
a = 1; | ||
// ^ reference local 4 | ||
print_fib(a); | ||
// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/print_fib(). | ||
// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). | ||
// ^ reference local 4 | ||
} | ||
|
||
void forever() { | ||
// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/forever(). | ||
// documentation ```dart | ||
// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). | ||
// documentation | ||
// > ```dart | ||
// > void forever() | ||
// > ``` | ||
return forever(); | ||
// ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/forever(). | ||
// ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). | ||
} | ||
|
||
class SomeLocalClass {} | ||
// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/SomeLocalClass# | ||
// documentation ```dart | ||
// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# | ||
// documentation | ||
// > ```dart | ||
// > class SomeLocalClass | ||
// > ``` | ||
|
||
/// Reference parameter: [value] | ||
// ^^^^^ reference local 5 | ||
/// Reference class: [SomeLocalClass] | ||
// ^^^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/main.dart/SomeLocalClass# | ||
// ^^^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# | ||
/// Reference external class: [Foo] | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/other.dart/Foo# | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# | ||
/// Missing Reference: [IDontExist] | ||
void someFunction(int value) { | ||
// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/main.dart/someFunction(). | ||
// documentation ```dart | ||
// documentation Reference parameter: [value] | ||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/int.dart/int# | ||
// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). | ||
// documentation | ||
// > ```dart | ||
// > void someFunction(int value) | ||
// > ``` | ||
// documentation | ||
// > Reference parameter: [value] | ||
// > Reference class: [SomeLocalClass] | ||
// > Reference external class: [Foo] | ||
// > Missing Reference: [IDontExist] | ||
// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# | ||
// ^^^^^ definition local 5 | ||
// documentation ```dart | ||
// documentation | ||
// > ```dart | ||
// > int value | ||
// > ``` | ||
Foo(1); | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/other.dart/Foo# | ||
// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# | ||
} |
Oops, something went wrong.