Skip to content

Commit

Permalink
fix: don't warn about missing inheritdoc in interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Jan 13, 2024
1 parent ffe5608 commit 5b47a1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ModifierDefinition,
StructDefinition,
VariableDeclaration,
ContractDefinition,
} from 'solc-typed-ast';

export class Validator {
Expand Down Expand Up @@ -103,6 +104,9 @@ export class Validator {
// Public variable
_requiresInheritdoc ||= node instanceof VariableDeclaration && node.visibility === 'public';

// The node is in a contract
_requiresInheritdoc &&= node.parent instanceof ContractDefinition && node.parent.kind === 'contract';

return _requiresInheritdoc;
}
}

0 comments on commit 5b47a1a

Please sign in to comment.