hundreds-father-404
01/14/2022, 6:42 PMvalidate goal, but I'm merging that goal into lint
Some ideas:
• sourcefile-validation
• regex-validatorchilly-magazine-21545
01/14/2022, 6:46 PMhundreds-father-404
01/14/2022, 6:48 PMregex-validator a lot too. Indeed, it can be used for any arbitrary regexcurved-television-6568
01/14/2022, 7:00 PMregex-validator name, feels like its purpose is to validate regex’es.curved-television-6568
01/14/2022, 7:01 PMsourcefile-validation is a bit cumbersome, but more to the point, imo.curved-television-6568
01/14/2022, 7:03 PMassert-patterns .. ? I’m unable to come up with something I feel strongly for, so.. either way, I guess for me 🙂proud-dentist-22844
01/14/2022, 7:14 PMhundreds-father-404
01/14/2022, 7:17 PMassert-patterns, I think we probably want a noun because it's going to show up in messages like
Flake8 succeeded
regex-validator failed
But it could be pattern-checker for exampleproud-dentist-22844
01/14/2022, 7:24 PMdo-that-thinger succeeded…proud-dentist-22844
01/14/2022, 7:24 PMproud-dentist-22844
01/14/2022, 7:28 PMregextioneercurved-television-6568
01/14/2022, 7:29 PMlint is the verb..curved-television-6568
01/14/2022, 7:29 PMregex-patterns .. ?curved-television-6568
01/14/2022, 7:30 PMregex-validation 🙂bitter-ability-32190
01/14/2022, 7:35 PMhundreds-father-404
01/14/2022, 7:36 PMIsn't the fact that it uses a regex just an implementation detail?I don't think so because you provide the regexes yourself. This is Pants's config for what is currently the
validate goal:
path_patterns:
- name: python_source
pattern: (?<!__init__)\.py$
- name: rust_source
pattern: .*.rs$
- name: build_files
pattern: /BUILD(?:\..*)?$
content_patterns:
- name: python_header
pattern: |+
^(?:#\!\/usr\/bin\/env python3
)?# Copyright 20\d\d Pants project contributors \(see CONTRIBUTORS.md\)\.
# Licensed under the Apache License, Version 2.0 \(see LICENSE\)\.
- name: rust_header
pattern: |+
^// Copyright 20\d\d Pants project contributors \(see CONTRIBUTORS.md\)\.
// Licensed under the Apache License, Version 2.0 \(see LICENSE\)\.
required_matches:
python_source:
- python_header
# TODO: Make rust code conform, then uncomment this.
# rust_source:
# - rust_header
build_files:
- python_headerhappy-kitchen-89482
01/14/2022, 7:41 PMrelint?curved-television-6568
01/14/2022, 7:41 PMhundreds-father-404
01/14/2022, 7:43 PMalternative-to-regex-validator or so on. I suspect it would be cleaner to keep them separate. (And that's part of my motivation for merging validate goal into just one of many lint implementations)hundreds-father-404
01/14/2022, 7:44 PMregex-lint or regex-linter? I don't love the ambiguity of what "re" meanshundreds-father-404
01/14/2022, 7:44 PMregex-linter > regex-validator, given that it's the lint goal 😉bitter-ability-32190
01/14/2022, 7:44 PMimport re
Also, since we're bikeshedding regex-linter looks like it lints regexescurved-television-6568
01/14/2022, 7:50 PMlint-patterns ?bitter-ability-32190
01/14/2022, 7:52 PMfile-contents-pattern-matcher really just eat those columns uphappy-kitchen-89482
01/14/2022, 7:52 PMregex-lint ?happy-kitchen-89482
01/14/2022, 7:52 PMpattern-matcher ?bitter-ability-32190
01/14/2022, 7:57 PMfilestamp if you want to just use a more nebulus namehundreds-father-404
01/14/2022, 8:05 PMregex-lint also sound like it's linting regex? I see why regex-linter sounds like that, but this feels different to mebitter-ability-32190
01/14/2022, 8:05 PMbitter-ability-32190
01/14/2022, 8:06 PMbitter-ability-32190
01/14/2022, 8:06 PMcurved-television-6568
01/14/2022, 8:10 PMregex-lint worksbitter-ability-32190
01/14/2022, 8:11 PMregex-filelint some part of me itches for filehundreds-father-404
01/14/2022, 8:13 PMfile vs what, directories?
I think regex-lint seems to work well. Thanks all for participating in the bike shed of the week 😅curved-television-6568
01/14/2022, 8:14 PMThat makes me wonderI think vs “regex’es”.. makes it very clear it is not regex patterns being linted..vs what, directories?file
curved-television-6568
01/14/2022, 8:15 PMregex-filelinter would work too.. (I prefer regex-lint though, it is more succinct)