robotframework-robocop 5.8.0__tar.gz → 5.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {robotframework_robocop-5.8.0/robotframework_robocop.egg-info → robotframework_robocop-5.8.1}/PKG-INFO +17 -2
  2. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/misc.py +22 -3
  3. robotframework_robocop-5.8.1/robocop/version.py +1 -0
  4. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1/robotframework_robocop.egg-info}/PKG-INFO +17 -2
  5. robotframework_robocop-5.8.0/robocop/version.py +0 -1
  6. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/LICENSE +0 -0
  7. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/MANIFEST.in +0 -0
  8. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/README.md +0 -0
  9. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/pyproject.toml +0 -0
  10. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/__init__.py +0 -0
  11. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/__main__.py +0 -0
  12. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/__init__.py +0 -0
  13. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/comments.py +0 -0
  14. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/community_rules/__init__.py +0 -0
  15. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/community_rules/keywords.py +0 -0
  16. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/community_rules/misc.py +0 -0
  17. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/community_rules/usage.py +0 -0
  18. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/documentation.py +0 -0
  19. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/duplications.py +0 -0
  20. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/errors.py +0 -0
  21. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/lengths.py +0 -0
  22. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/naming.py +0 -0
  23. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/spacing.py +0 -0
  24. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/checkers/tags.py +0 -0
  25. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/config.py +0 -0
  26. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/exceptions.py +0 -0
  27. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/files.py +0 -0
  28. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/__init__.py +0 -0
  29. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/compare_runs_report.py +0 -0
  30. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/file_stats_report.py +0 -0
  31. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/json_report.py +0 -0
  32. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/return_status_report.py +0 -0
  33. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/robocop_version_report.py +0 -0
  34. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/rules_by_id_report.py +0 -0
  35. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/rules_by_severity_report.py +0 -0
  36. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/sarif_report.py +0 -0
  37. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/time_taken_report.py +0 -0
  38. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/reports/timestamp_report.py +0 -0
  39. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/rules.py +0 -0
  40. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/run.py +0 -0
  41. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/__init__.py +0 -0
  42. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/disablers.py +0 -0
  43. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/file_types.py +0 -0
  44. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/misc.py +0 -0
  45. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/run_keywords.py +0 -0
  46. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/variable_matcher.py +0 -0
  47. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robocop/utils/version_matching.py +0 -0
  48. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robotframework_robocop.egg-info/SOURCES.txt +0 -0
  49. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robotframework_robocop.egg-info/dependency_links.txt +0 -0
  50. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robotframework_robocop.egg-info/entry_points.txt +0 -0
  51. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robotframework_robocop.egg-info/requires.txt +0 -0
  52. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/robotframework_robocop.egg-info/top_level.txt +0 -0
  53. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/setup.cfg +0 -0
  54. {robotframework_robocop-5.8.0 → robotframework_robocop-5.8.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: robotframework-robocop
3
- Version: 5.8.0
3
+ Version: 5.8.1
4
4
  Summary: Static code analysis tool (linter) for Robot Framework
5
5
  Home-page: https://github.com/MarketSquare/robotframework-robocop
6
6
  Download-URL: https://pypi.org/project/robotframework-robocop
@@ -51,6 +51,21 @@ Requires-Dist: sphinx_design; extra == "doc"
51
51
  Requires-Dist: sphinx-copybutton; extra == "doc"
52
52
  Requires-Dist: sphinxemoji; extra == "doc"
53
53
  Requires-Dist: pygments; extra == "doc"
54
+ Dynamic: author
55
+ Dynamic: author-email
56
+ Dynamic: classifier
57
+ Dynamic: description
58
+ Dynamic: description-content-type
59
+ Dynamic: download-url
60
+ Dynamic: home-page
61
+ Dynamic: keywords
62
+ Dynamic: license
63
+ Dynamic: platform
64
+ Dynamic: project-url
65
+ Dynamic: provides-extra
66
+ Dynamic: requires-dist
67
+ Dynamic: requires-python
68
+ Dynamic: summary
54
69
 
55
70
  [![Unit tests](https://github.com/MarketSquare/robotframework-robocop/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/MarketSquare/robotframework-robocop/actions/workflows/unit-tests.yml "GitHub Workflow Unit Tests Status")
56
71
  ![Codecov](https://img.shields.io/codecov/c/github/MarketSquare/robotframework-robocop/master "Code coverage on master branch")
@@ -1,6 +1,7 @@
1
1
  """Miscellaneous checkers"""
2
2
 
3
3
  import ast
4
+ import re
4
5
  from dataclasses import dataclass
5
6
  from pathlib import Path
6
7
  from typing import Optional
@@ -882,12 +883,20 @@ rules = {
882
883
  misreading your keyword arguments, explicitly state that the value is empty using the
883
884
  built-in ``${EMPTY}`` variable.
884
885
 
885
- If your argument is falsly flagged by this rule, escape the ``=`` character in your argument
886
- value by like so: ``\\=``.
887
-
888
886
  Example of a rule violation::
889
887
 
890
888
  My Amazing Keyword argument_name=
889
+
890
+ Positional arguments that end with a ``=`` character can be falsly flagged by this rule. You
891
+ can fix this by making the situation more explicit:
892
+
893
+ 1. Escape the ``=`` character::
894
+
895
+ Log value\\=
896
+
897
+ 2. Make it a named argument instead::
898
+
899
+ Log message=value=
891
900
  """,
892
901
  ),
893
902
  }
@@ -1997,6 +2006,7 @@ class UndefinedArgumentDefaultChecker(VisitorChecker):
1997
2006
  "undefined-argument-default",
1998
2007
  "undefined-argument-value",
1999
2008
  )
2009
+ valid_argument_name = re.compile(r"[a-zA-Z0-9-_ ]+")
2000
2010
 
2001
2011
  def visit_Arguments(self, node: Arguments): # noqa: N802
2002
2012
  for token in node.get_tokens(Token.ARGUMENT):
@@ -2034,10 +2044,19 @@ class UndefinedArgumentDefaultChecker(VisitorChecker):
2034
2044
  # `=` is escaped
2035
2045
  continue
2036
2046
 
2047
+ if arg_name.endswith(" "):
2048
+ # Space before `=` is not a named arg
2049
+ continue
2050
+
2037
2051
  if default_val != "":
2038
2052
  # Has a value
2039
2053
  continue
2040
2054
 
2055
+ is_plain_var_name = self.valid_argument_name.fullmatch(arg_name)
2056
+ if is_plain_var_name is None:
2057
+ # Argument name includes invalid chars
2058
+ continue
2059
+
2041
2060
  # Falsly triggers if a positional argument ends with `=`
2042
2061
  # The language server has the same behavior
2043
2062
  self.report(
@@ -0,0 +1 @@
1
+ __version__ = "5.8.1"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: robotframework-robocop
3
- Version: 5.8.0
3
+ Version: 5.8.1
4
4
  Summary: Static code analysis tool (linter) for Robot Framework
5
5
  Home-page: https://github.com/MarketSquare/robotframework-robocop
6
6
  Download-URL: https://pypi.org/project/robotframework-robocop
@@ -51,6 +51,21 @@ Requires-Dist: sphinx_design; extra == "doc"
51
51
  Requires-Dist: sphinx-copybutton; extra == "doc"
52
52
  Requires-Dist: sphinxemoji; extra == "doc"
53
53
  Requires-Dist: pygments; extra == "doc"
54
+ Dynamic: author
55
+ Dynamic: author-email
56
+ Dynamic: classifier
57
+ Dynamic: description
58
+ Dynamic: description-content-type
59
+ Dynamic: download-url
60
+ Dynamic: home-page
61
+ Dynamic: keywords
62
+ Dynamic: license
63
+ Dynamic: platform
64
+ Dynamic: project-url
65
+ Dynamic: provides-extra
66
+ Dynamic: requires-dist
67
+ Dynamic: requires-python
68
+ Dynamic: summary
54
69
 
55
70
  [![Unit tests](https://github.com/MarketSquare/robotframework-robocop/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/MarketSquare/robotframework-robocop/actions/workflows/unit-tests.yml "GitHub Workflow Unit Tests Status")
56
71
  ![Codecov](https://img.shields.io/codecov/c/github/MarketSquare/robotframework-robocop/master "Code coverage on master branch")
@@ -1 +0,0 @@
1
- __version__ = "5.8.0"