azure-cli-dev-tools icon indicating copy to clipboard operation
azure-cli-dev-tools copied to clipboard

[linter] Linter help_rules.py should lint help objects and not help_entries.

Open adewaleo opened this issue 7 years ago • 3 comments

[linter] Linter help_rules.py should lint help objects and not help_entries. We will soon support help.yaml alongside help.py. Linter rules should be independent of help_entry type.

Secondly, linter should handle parsing incorrect datetime's or condition values. ie. monitor --start-time and --condition parameter. Should raise appropriate error.

Linter should also validate parameter values to the extent that this is possible / reasonable. E.g. enum values, true false, etc.

adewaleo avatar Jan 16 '19 22:01 adewaleo

@adewaleo I'm moving this to the backlog for now. It isn't urgent to do this conversion this sprint and I don't want to port the conversion to azdev when we could just do the conversion in azdev once it is released :)

tjprescott avatar Jan 18 '19 21:01 tjprescott

Nice! Makes sense, @tjprescott I can definitely work on this after we release azdev. :)

adewaleo avatar Jan 18 '19 22:01 adewaleo

@tjprescott I will tag/ add two problems to this:

  • faulty_help_example_parameters_rule should not lint arguments that start with "az " for example: az find "az vm". See https://github.com/Azure/azure-cli/pull/8608. (Will be resolved in #46)
  • It also should not lint commands that appear in a comment. (will be resolved in #46)

Update

  • New issue. Linter does not handle nested commands with quotes properly. Consider using simpler regex and clear string manipulation logic instead.

adewaleo avatar Feb 22 '19 00:02 adewaleo