Skip to content

Commit

Permalink
Merge pull request #38 from padok-team/fix/TF_NAM_004
Browse files Browse the repository at this point in the history
fix(check): tF_NAM_004
  • Loading branch information
Benjamin Sanvoisin authored Nov 3, 2023
2 parents 892ffc7 + cefed89 commit 5b9c135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checks/var_number_matches_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func VarNumberMatchesType() (data.Check, error) {
variable.Type = strings.ReplaceAll(variable.Type, "\n", "")
variable.Type = strings.ReplaceAll(variable.Type, " ", "")

if isCollection && !pluralize.IsPlural(variable.Name) || !isCollection && !pluralize.IsSingular(variable.Name) {
if isCollection && !pluralize.IsPlural(variable.Name) {
variablesInError = append(variablesInError, variable.Pos.Filename+":"+strconv.Itoa(variable.Pos.Line)+" --> "+variable.Name)
}
}
Expand Down

0 comments on commit 5b9c135

Please sign in to comment.