class

Detector::Specification::ZapSitesTree

Inherits Detector < Reference < Object

Constants

SITES_MARKER = /Sites/

Every .yaml/.yml in the tree reaches this guard.

Class methods

tech_name

The tech name without needing an instance, so the registry can be read off the classes themselves rather than from a parallel list.

Source

Instance methods

applicable?(filename : String) : Bool

Extension only. A *sites* basename gate looks tempting, but ZAP export filenames are chosen by the user at export time — an export saved as zap_export.yaml or target.yaml would be dropped with no diagnostic. The expensive work (yaml_any?) is already gated in detect by the SITES_MARKER content guard, so the name gate only saved a substring scan and bought that at the price of a silent false negative. Registers ZAP sites-tree paths in CodeLocator.

Source
detect(filename : String, file_contents : String) : Bool
Source
idempotent?

Extension only. A *sites* basename gate looks tempting, but ZAP export filenames are chosen by the user at export time — an export saved as zap_export.yaml or target.yaml would be dropped with no diagnostic. The expensive work (yaml_any?) is already gated in detect by the SITES_MARKER content guard, so the name gate only saved a substring scan and bought that at the price of a silent false negative. Registers ZAP sites-tree paths in CodeLocator.

Source
set_name

Extension only. A *sites* basename gate looks tempting, but ZAP export filenames are chosen by the user at export time — an export saved as zap_export.yaml or target.yaml would be dropped with no diagnostic. The expensive work (yaml_any?) is already gated in detect by the SITES_MARKER content guard, so the name gate only saved a substring scan and bought that at the price of a silent false negative. Registers ZAP sites-tree paths in CodeLocator.

Source