Skip to content

Commit 486ca27

Browse files
committed
Fix formatting issues
1 parent 5670b41 commit 486ca27

File tree

3 files changed

+55
-27
lines changed

3 files changed

+55
-27
lines changed

.github/workflows/eventlist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ jobs:
276276
test "$COVERAGE_INT" -gt 975
277277
working-directory: ./tools/eventlist
278278

279+
# Temporarily disabled until we move on codeclimate
279280
- name: Upload coverage to Codecov
281+
if: false
280282
uses: codecov/codecov-action@v5
281283
with:
282284
files: ./tools/eventlist/build/cover.out

tools/eventlist/pkg/eval/value.go

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ func (v *Value) getValue() (Value, error) {
6161
// the assignment process.
6262
//
6363
// Parameters:
64-
// v1 - The Value to be assigned to the receiver.
64+
//
65+
// v1 - The Value to be assigned to the receiver.
6566
//
6667
// Returns:
67-
// An error if the assignment fails or if the receiver is not a variable.
68+
//
69+
// An error if the assignment fails or if the receiver is not a variable.
6870
func (v *Value) setValue(v1 *Value) error {
6971
if v.v == nil {
7072
return typeError("not a variable", "")
@@ -78,10 +80,12 @@ func (v *Value) setValue(v1 *Value) error {
7880
// If the receiver Value is not of type List, it returns a type error.
7981
//
8082
// Parameters:
81-
// v1 - The Value to be added to the list.
83+
//
84+
// v1 - The Value to be added to the list.
8285
//
8386
// Returns:
84-
// An error if the receiver Value is not of type List, otherwise nil.
87+
//
88+
// An error if the receiver Value is not of type List, otherwise nil.
8589
func (v *Value) addList(v1 Value) error {
8690
if v.t == Nix {
8791
v.t = List
@@ -280,11 +284,13 @@ func (v *Value) Function(v1 *Value) error {
280284
// right-shifted by the offset and stored back in the Value struct.
281285
//
282286
// Parameters:
283-
// sz - The number of bytes to extract.
284-
// off - The starting byte position for extraction.
287+
//
288+
// sz - The number of bytes to extract.
289+
// off - The starting byte position for extraction.
285290
//
286291
// Returns:
287-
// An error if the type of the value is not Integer.
292+
//
293+
// An error if the type of the value is not Integer.
288294
func (v *Value) Extract(sz uint32, bigEndian bool, off uint32) error {
289295
if v.t != Integer {
290296
return typeError("Extract", "")
@@ -659,10 +665,12 @@ func (v *Value) Mod(v1 *Value) error {
659665
// compatible, a typeError is returned.
660666
//
661667
// Parameters:
662-
// v1 - The value to be added to the receiver.
668+
//
669+
// v1 - The value to be added to the receiver.
663670
//
664671
// Returns:
665-
// An error if the types are not compatible for addition, otherwise nil.
672+
//
673+
// An error if the types are not compatible for addition, otherwise nil.
666674
func (v *Value) Add(v1 *Value) error {
667675
switch v.t {
668676
case Integer:
@@ -750,10 +758,12 @@ func (v *Value) Shl(v1 *Value) error {
750758
// it returns a typeError.
751759
//
752760
// Parameters:
753-
// v1 - The Value containing the integer by which the receiver's integer value will be shifted.
761+
//
762+
// v1 - The Value containing the integer by which the receiver's integer value will be shifted.
754763
//
755764
// Returns:
756-
// An error if either value is not of type Integer, otherwise nil.
765+
//
766+
// An error if either value is not of type Integer, otherwise nil.
757767
func (v *Value) Shr(v1 *Value) error {
758768
if v.t != Integer || v1.t != Integer {
759769
return typeError("shr", "")
@@ -885,10 +895,12 @@ func (v *Value) LessEqual(v1 *Value) error {
885895
// The resulting type always is forced to be Integer.
886896
//
887897
// Parameters:
888-
// v1 *Value - The Value to compare with the current Value.
898+
//
899+
// v1 *Value - The Value to compare with the current Value.
889900
//
890901
// Returns:
891-
// error - Returns a type error if the types of the Values are incompatible for comparison, otherwise returns nil.
902+
//
903+
// error - Returns a type error if the types of the Values are incompatible for comparison, otherwise returns nil.
892904
func (v *Value) Greater(v1 *Value) error {
893905
switch v.t {
894906
case Integer:
@@ -999,10 +1011,12 @@ func (v *Value) GreaterEqual(v1 *Value) error {
9991011
// The resulting type always is forced to be Integer.
10001012
//
10011013
// Parameters:
1002-
// v1 - The Value object to compare with the current Value object.
1014+
//
1015+
// v1 - The Value object to compare with the current Value object.
10031016
//
10041017
// Returns:
1005-
// error - An error if the types are not supported for comparison, otherwise nil.
1018+
//
1019+
// error - An error if the types are not supported for comparison, otherwise nil.
10061020
func (v *Value) Equal(v1 *Value) error {
10071021
switch v.t {
10081022
case Integer:
@@ -1057,10 +1071,12 @@ func (v *Value) Equal(v1 *Value) error {
10571071
// The resulting type always is forced to be Integer.
10581072
//
10591073
// Parameters:
1060-
// v1 (*Value): The Value object to compare with.
1074+
//
1075+
// v1 (*Value): The Value object to compare with.
10611076
//
10621077
// Returns:
1063-
// error: An error if the types are incompatible, otherwise nil.
1078+
//
1079+
// error: An error if the types are incompatible, otherwise nil.
10641080
func (v *Value) NotEqual(v1 *Value) error {
10651081
switch v.t {
10661082
case Integer:
@@ -1112,10 +1128,12 @@ func (v *Value) NotEqual(v1 *Value) error {
11121128
// The result of the operation is stored in the current Value.
11131129
//
11141130
// Parameters:
1115-
// v1 - The Value to perform the bitwise AND operation with.
1131+
//
1132+
// v1 - The Value to perform the bitwise AND operation with.
11161133
//
11171134
// Returns:
1118-
// An error if either Value is not of Integer type, otherwise nil.
1135+
//
1136+
// An error if either Value is not of Integer type, otherwise nil.
11191137
func (v *Value) And(v1 *Value) error {
11201138
if v.t != Integer || v1.t != Integer {
11211139
return typeError("And", "")
@@ -1130,10 +1148,12 @@ func (v *Value) And(v1 *Value) error {
11301148
// receiver's integer field.
11311149
//
11321150
// Parameters:
1133-
// v1 - The Value to XOR with the receiver.
1151+
//
1152+
// v1 - The Value to XOR with the receiver.
11341153
//
11351154
// Returns:
1136-
// An error if either Value is not of type Integer, otherwise nil.
1155+
//
1156+
// An error if either Value is not of type Integer, otherwise nil.
11371157
func (v *Value) Xor(v1 *Value) error {
11381158
if v.t != Integer || v1.t != Integer {
11391159
return typeError("Xor", "")
@@ -1165,10 +1185,12 @@ func (v *Value) Or(v1 *Value) error {
11651185
// as an Integer (1 for true, 0 for false).
11661186
//
11671187
// Parameters:
1168-
// v1 - The Value to perform the logical AND operation with.
1188+
//
1189+
// v1 - The Value to perform the logical AND operation with.
11691190
//
11701191
// Returns:
1171-
// error - Returns a typeError if either Value is not of type Integer or Floating.
1192+
//
1193+
// error - Returns a typeError if either Value is not of type Integer or Floating.
11721194
func (v *Value) LogAnd(v1 *Value) error {
11731195
if v.t != Integer && v.t != Floating || v1.t != Integer && v1.t != Floating {
11741196
return typeError("LogAnd", "")
@@ -1189,10 +1211,12 @@ func (v *Value) LogAnd(v1 *Value) error {
11891211
// otherwise, the result is 0 (false). The result is stored in the current Value (v) as an Integer type.
11901212
//
11911213
// Parameters:
1192-
// v1 - The Value to perform the logical OR operation with.
1214+
//
1215+
// v1 - The Value to perform the logical OR operation with.
11931216
//
11941217
// Returns:
1195-
// error - Returns a typeError if either Value is not of type Integer or Floating.
1218+
//
1219+
// error - Returns a typeError if either Value is not of type Integer or Floating.
11961220
func (v *Value) LogOr(v1 *Value) error {
11971221
if v.t != Integer && v.t != Floating || v1.t != Integer && v1.t != Floating {
11981222
return typeError("LogOr", "")

tools/eventlist/pkg/eval/variable.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ func GetVar(n string) (*Variable, error) {
7575
// - i: The integer value to assign to the variable.
7676
//
7777
// Returns:
78-
// A pointer to the newly created Variable instance.
78+
//
79+
// A pointer to the newly created Variable instance.
7980
func SetVarI(n string, i int64) *Variable {
8081
val := Value{t: Integer, i: i}
8182
v := new(Variable)
@@ -99,7 +100,8 @@ func SetVarI(n string, i int64) *Variable {
99100
// - val: The value to be assigned to the variable.
100101
//
101102
// Returns:
102-
// A pointer to the newly created Variable.
103+
//
104+
// A pointer to the newly created Variable.
103105
func SetVar(n string, val Value) *Variable {
104106
v := new(Variable)
105107
v.n = n

0 commit comments

Comments
 (0)