Skip to content

Commit

Permalink
Update analysis options, lint cleanup, sdk workaround removal (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorbel1 authored Jun 21, 2024
1 parent 2dfcc08 commit ddbd2d1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 15 deletions.
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

0 comments on commit ddbd2d1

Please sign in to comment.