Unverified Commit 188a922e authored by M Bernt's avatar M Bernt Committed by GitHub
Browse files

Apply suggestions from code review

parent 9f86a7db
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -78,10 +78,12 @@ class ValidDatatypes(Linter):
        for attrib in ["format", "ftype", "ext"]:
            for elem in tool_xml.findall(f".//*[@{attrib}]"):
                formats = elem.get(attrib, "").split(",")
                # Certain elements (e.g. `data`) can only have one format. This
                # is checked separately by linting against the XSD.
                if "auto" in formats:
                    if elem.tag == "param":
                        lint_ctx.error(
                            f"Format [auto] can not be used for tool or tool test inputs",
                            "Format [auto] can not be used for tool or tool test inputs",
                            linter=cls.name(),
                            node=elem,
                        )