Auto-Submit | +1 |
Hey Nik, can you take a look please?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
r"^([a-z0-9]+(?:-[a-z0-9]+)*\.)*[a-z0-9]+(?:-[a-z0-9]+)*$")
As you said this was taken from a file can you leave a comment with which file it was?
for _, line in f.ChangedContents():
Let's add a pointer comment that here we are reading the lines that changed explicitly.
output_api.PresubmitResultLocation(file_path=local_path)
Love to see more uses of locations!
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Commit-Queue | +2 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
Commit-Queue | +2 |
r"^([a-z0-9]+(?:-[a-z0-9]+)*\.)*[a-z0-9]+(?:-[a-z0-9]+)*$")
As you said this was taken from a file can you leave a comment with which file it was?
Done
Let's add a pointer comment that here we are reading the lines that changed explicitly.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: PRESUBMIT.py
Insertions: 9, Deletions: 0.
@@ -463,6 +463,14 @@
def CheckKnownContextValues(input_api, output_api):
+ """Ensure all additions to `KnownContextValues.ts` following the naming convention.
+
+ This check ensures that all new cases added to the enum in `KnownContextValues.ts`
+ follow the extended Kebab Case naming convention. Specifically it doesn't look at
+ unchanged lines, because there are various existing values that cannot be changed
+ (easily).
+ """
+ # This regexp matches the one we use in `StringUtilities.isExtendedKebabCase()`.
kebab_case_re = re.compile(
r"^([a-z0-9]+(?:-[a-z0-9]+)*\.)*[a-z0-9]+(?:-[a-z0-9]+)*$")
local_path = input_api.os_path.join('front_end', 'ui', 'visual_logging',
@@ -471,6 +479,7 @@
for f in filter(
lambda x: (x.LocalPath() == local_path and x.Action() == 'M'),
input_api.AffectedFiles()):
+ # Loop only through the changed lines of the affected file.
for _, line in f.ChangedContents():
match = re.search(r"\s+'(.+)',", line)
if match:
```
[visual_logging] Enforce kebab case for new jslog contexts.
For any new value added to the `KnownContextValues.ts` file, ensure it
follows the extended Kebab Case naming convention.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |