                 }
                 let startLine = file.line(for: offset, startFrom: 0)
                 let endLine = file.line(for: offset + length, startFrom: startLine)
+                var lines = Set(startLine...endLine)
 
-                for lineNumber in startLine...endLine {
-                    result.update(with: lineNumber)
+                // Exclude the body where the accessors are
+                if let bodyOffset = statement.bodyOffset,
+                   let bodyLength = statement.bodyLength {
+                    let bodyStart = file.line(for: bodyOffset, startFrom: startLine) + 1
+                    let bodyEnd = file.line(for: bodyOffset + bodyLength, startFrom: bodyStart) - 1
+                    
+                    if bodyStart <= bodyEnd {
+                        lines.subtract(Set(bodyStart...bodyEnd))
+                    }
                 }
+                result.formUnion(lines)
             default:
                 break
             }
-            if statement["key.substructure"] != nil {
-                result.formUnion(varLetLineNumbers(file: file, structure: statement.substructure))
+            
+            let substructure = statement.substructure
+            
+            if !substructure.isEmpty {
+                result.formUnion(varLetLineNumbers(file: file, structure: substructure))
             }
         }
         return result

        let varLines = varLetLineNumbers(file: file, structure: file.structure.dictionary.substructure)
        let commentLines = commentLineNumbers(file: file)
        var violations = [StyleViolation]()
        let notWhitespace = CharacterSet.whitespaces.inverted

        for (index, line) in file.lines.enumerated() {
            guard !varLines.contains(index) &&
                  !commentLines.contains(index) else {
                continue
            }

            let lastRange = line.content.rangeOfCharacter(from: notWhitespace, options: [.backwards])
            let firstRange = line.content.rangeOfCharacter(from: notWhitespace)

            // Precedes var/let and has text not ending with {
            if linePrecedesVar(index, varLines, commentLines) {
                if let last = lastRange.map({ line.content.substring(with: $0) }), last != "{" {
                    violated(&violations, file, index)
                }
            }
            // Follows var/let and has text not starting with }
            if lineFollowsVar(index, varLines, commentLines) {
                if let first = firstRange.map({ line.content.substring(with: $0) }), first != "}" {
                    violated(&violations, file, index)
                }
            }

            "let a = 0\nvar x = 1\n\nx = 2\n",
            "a = 5\n\nvar x = 1\n",
            "struct X {\n\tvar a = 0\n}\n",
            "let a = 1 +\n\t2\nlet b = 5\n",
            "var x: Int {\n\treturn 0\n}\n"
        ],
        triggeringExamples: [
            "var x = 1\n↓x = 2\n",
            "a = 5\n↓var x = 1\n",
            "struct X {\n\tlet a\n\t↓func x() {}\n}\n",
            "var x: Int {\n\tlet a = 0\n\treturn a\n}\n"
        ]
    )

