Skip to content

Commit 5bfe52d

Browse files
committed
fix(connector-linter): use keyword lineno for author ref location and restrict VC315 to external-import connectors
1 parent dbec4dd commit 5bfe52d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

shared/connector_linter/connector_linter/checks/vc3xx_code/vc302_author_referenced.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ def _find_author_references(
4545
continue
4646
for kw in node.keywords:
4747
if kw.arg in _AUTHOR_KWARGS:
48-
# Use the keyword's col_offset for line selection when
49-
# available; fall back to the call node's lineno otherwise
48+
# Use the keyword node's own lineno when available;
49+
# fall back to the call node's lineno otherwise
5050
hits.append(
5151
(
5252
file_path,
53-
(kw.col_offset and node.lineno) or node.lineno,
53+
getattr(kw, "lineno", node.lineno) or node.lineno,
5454
kw.arg,
5555
),
5656
)

shared/connector_linter/connector_linter/checks/vc3xx_code/vc315_work_initiated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""VC315 — Connector must initiate work before processing.
22
3-
External-import and internal-enrichment connectors must call
3+
External-import connectors must call
44
``self.helper.api.work.initiate_work(self.helper.connect_id, friendly_name)``
55
to properly track work lifecycle in the OpenCTI platform.
66

0 commit comments

Comments
 (0)