We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf89f77 commit b4b4e4dCopy full SHA for b4b4e4d
1 file changed
internal/cadence/linter.go
@@ -553,11 +553,15 @@ func (l *linter) getExportedIdentifiers(filePath string) []ast.Identifier {
553
554
func exportedIdentifiersFromProgram(program *ast.Program) []ast.Identifier {
555
var identifiers []ast.Identifier
556
- for _, decl := range program.CompositeDeclarations() {
557
- identifiers = append(identifiers, decl.Identifier)
558
- }
559
- for _, decl := range program.InterfaceDeclarations() {
560
+ for _, decl := range program.Declarations() {
+ identifier := decl.DeclarationIdentifier()
+ if identifier == nil {
+ continue
+ }
561
+ if decl.DeclarationAccess() != ast.AccessAll {
562
563
564
+ identifiers = append(identifiers, *identifier)
565
}
566
return identifiers
567
0 commit comments