a437390310
Add a diff driver for Scheme-like languages which recognizes top level and local `define` forms, whether it is a function definition, binding, syntax definition or a user-defined `define-xyzzy` form. Also supports R6RS `library` forms, `module` forms along with class and struct declarations used in Racket (PLT Scheme). Alternate "def" syntax such as those in Gerbil Scheme are also supported, like defstruct, defsyntax and so on. The rationale for picking `define` forms for the hunk headers is because it is usually the only significant form for defining the structure of the program, and it is a common pattern for schemers to have local function definitions to hide their visibility, so it is not only the top level `define`'s that are of interest. Schemers also extend the language with macros to provide their own define forms (for example, something like a `define-test-suite`) which is also captured in the hunk header. Since it is common practice to extend syntax with variants of a form like `module+`, `class*` etc, those have been supported as well. The word regex is a best-effort attempt to conform to R7RS[1] valid identifiers, symbols and numbers. [1] https://small.r7rs.org/attachment/r7rs.pdf (section 2.1) Signed-off-by: Atharva Raykar <raykar.ath@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
bash-arithmetic-function | ||
bash-bashism-style-compact | ||
bash-bashism-style-function | ||
bash-bashism-style-whitespace | ||
bash-conditional-function | ||
bash-missing-parentheses | ||
bash-mixed-style-compact | ||
bash-mixed-style-function | ||
bash-nested-functions | ||
bash-other-characters | ||
bash-posix-style-compact | ||
bash-posix-style-function | ||
bash-posix-style-whitespace | ||
bash-subshell-function | ||
bash-trailing-comment | ||
cpp-c++-function | ||
cpp-class-constructor | ||
cpp-class-constructor-mem-init | ||
cpp-class-definition | ||
cpp-class-definition-derived | ||
cpp-class-destructor | ||
cpp-function-returning-global-type | ||
cpp-function-returning-nested | ||
cpp-function-returning-pointer | ||
cpp-function-returning-reference | ||
cpp-gnu-style-function | ||
cpp-namespace-definition | ||
cpp-operator-definition | ||
cpp-skip-access-specifiers | ||
cpp-skip-comment-block | ||
cpp-skip-labels | ||
cpp-struct-definition | ||
cpp-struct-single-line | ||
cpp-template-function-definition | ||
cpp-union-definition | ||
cpp-void-c-function | ||
css-attribute-value-selector | ||
css-block-level-@-statements | ||
css-brace-in-col-1 | ||
css-class-selector | ||
css-colon-eol | ||
css-colon-selector | ||
css-common | ||
css-id-selector | ||
css-long-selector-list | ||
css-prop-sans-indent | ||
css-root-selector | ||
css-short-selector-list | ||
css-trailing-space | ||
custom1-pattern | ||
custom2-match-to-end-of-line | ||
custom3-alternation-in-pattern | ||
dts-labels | ||
dts-node-unitless | ||
dts-nodes | ||
dts-nodes-boolean-prop | ||
dts-nodes-comment1 | ||
dts-nodes-comment2 | ||
dts-nodes-multiline-prop | ||
dts-reference | ||
dts-root | ||
dts-root-comment | ||
elixir-do-not-pick-end | ||
elixir-ex-unit-test | ||
elixir-function | ||
elixir-macro | ||
elixir-module | ||
elixir-module-func | ||
elixir-nested-module | ||
elixir-private-function | ||
elixir-protocol | ||
elixir-protocol-implementation | ||
fortran-block-data | ||
fortran-comment | ||
fortran-comment-keyword | ||
fortran-comment-legacy | ||
fortran-comment-legacy-star | ||
fortran-external-function | ||
fortran-external-subroutine | ||
fortran-module | ||
fortran-module-procedure | ||
fortran-program | ||
fountain-scene | ||
golang-complex-function | ||
golang-func | ||
golang-interface | ||
golang-long-func | ||
golang-struct | ||
java-class-member-function | ||
markdown-heading-indented | ||
markdown-heading-non-headings | ||
matlab-class-definition | ||
matlab-function | ||
matlab-octave-section-1 | ||
matlab-octave-section-2 | ||
matlab-section | ||
perl-skip-end-of-heredoc | ||
perl-skip-forward-decl | ||
perl-skip-sub-in-pod | ||
perl-sub-definition | ||
perl-sub-definition-kr-brace | ||
php-abstract-class | ||
php-abstract-method | ||
php-class | ||
php-final-class | ||
php-final-method | ||
php-function | ||
php-interface | ||
php-method | ||
php-trait | ||
python-async-def | ||
python-class | ||
python-def | ||
python-indented-async-def | ||
python-indented-class | ||
python-indented-def | ||
README | ||
rust-fn | ||
rust-impl | ||
rust-macro-rules | ||
rust-struct | ||
rust-trait | ||
scheme-class | ||
scheme-def | ||
scheme-def-variant | ||
scheme-define-slash-public | ||
scheme-define-syntax | ||
scheme-define-variant | ||
scheme-library | ||
scheme-local-define | ||
scheme-module | ||
scheme-top-level-define | ||
scheme-user-defined-define |
How to write RIGHT test cases ============================= Insert the word "ChangeMe" (exactly this form) at a distance of at least two lines from the line that must appear in the hunk header. The text that must appear in the hunk header must contain the word "right", but in all upper-case, like in the title above. To mark a test case that highlights a malfunction, insert the word BROKEN in all lower-case somewhere in the file. This text is a bit twisted and out of order, but it is itself a test case for the default hunk header pattern. Know what you are doing if you change it. BTW, this tests that the head line goes to the hunk header, not the line of equal signs.