Skip to content

Update analysis options, lint cleanup, SDK workaround removal #495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024
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 analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ linter:
- avoid_function_literals_in_foreach_calls
- avoid_implementing_value_types
- avoid_init_to_null
# - avoid_js_rounded_ints
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
Expand Down Expand Up @@ -102,6 +102,7 @@ linter:
- lines_longer_than_80_chars
- literal_only_boolean_expressions
- matching_super_parameters
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
Expand Down Expand Up @@ -193,6 +194,7 @@ linter:
- unnecessary_lambdas
- unnecessary_late
- unnecessary_library_directive
- unnecessary_library_name
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_aware_operator_on_extension_on_nullable
Expand Down
2 changes: 1 addition & 1 deletion lib/src/modules/gates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ class LShift extends _ShiftGate {
/// Performs a multiplexer/ternary operation.
///
/// This is equivalent to something like:
/// ```
/// ```SystemVerilog
/// control ? d1 : d0
/// ```
Logic mux(Logic control, Logic d1, Logic d0) => Mux(control, d1, d0).out;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/selection.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023 Intel Corporation
// Copyright (C) 2023-2024 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// selection.dart
Expand All @@ -21,7 +21,7 @@ extension IndexedLogic on List<Logic> {
/// Alternatively we can approach this with `index.selectFrom(logicList)`
///
/// Example:
/// ```
/// ```dart
/// // ordering matches closer to array indexing with `0` index-based.
/// List<Logic> logicList = [/* Add your Logic elements here */];
/// selected <= logicList.selectIndex(index);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/signals/logic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ class Logic {
/// Alternatively we can approach this with `busList.selectIndex(index)`
///
/// Example:
/// ```
/// ```dart
/// // ordering matches closer to array indexing with `0` index-based.
/// selected <= index.selectFrom(busList);
/// ```
Expand Down
2 changes: 1 addition & 1 deletion lib/src/signals/logic_array.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class LogicArray extends LogicStructure {
/// to the length of the [updatedSubset].
///
/// Example:
/// ```
/// ```dart
/// LogicArray sampleLogic;
/// // Note: updatedSubset.length < (sampleLogic.length - start)
/// List<Logic> updatedSubset;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utilities/simcompare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ abstract class SimCompare {
}
return line;
})
.whereNotNull()
.nonNulls
.join('\n');
if (maskedOutput.isNotEmpty) {
print(maskedOutput);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/values/logic_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ abstract class LogicValue implements Comparable<LogicValue> {
/// Bitwise tristate merge. No width comparison.
///
/// Truth table for reference:
/// ```
/// ```csv
/// s0 value0 invalid0 s1 value1 invalid1 result value invalid
/// 0 0 0 0 0 0 0 0 0
/// 0 0 0 1 1 0 x 0 1
Expand Down
8 changes: 1 addition & 7 deletions test/translations_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2021-2023 Intel Corporation
// Copyright (C) 2021-2024 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// translations_test.dart
Expand All @@ -9,12 +9,6 @@

// ignore_for_file: avoid_multiple_declarations_per_line

// TODO(mkorbel1): reenable this test on JavaScript pending dart sdk issue,
// https://github.com/dart-lang/sdk/issues/54329.

@TestOn('vm')
library;

import 'package:rohd/rohd.dart';
import 'package:rohd/src/utilities/simcompare.dart';
import 'package:test/test.dart';
Expand Down