git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Utsav Parmar <utsavp0213@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] userdiff: add builtin driver for typescript language
Date: Fri, 05 Apr 2024 10:43:01 -0700	[thread overview]
Message-ID: <xmqqedbjvh7e.fsf@gitster.g> (raw)
In-Reply-To: <20240404163827.5855-1-utsavp0213@gmail.com> (Utsav Parmar's message of "Thu, 4 Apr 2024 22:08:27 +0530")

Utsav Parmar <utsavp0213@gmail.com> writes:

> Subject: Re: [PATCH v2] userdiff: add builtin driver for typescript language

"builtin driver" -> "patterns", probably, as the "userdiff"
customization does not allow adding any new code.

> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
> index 4338d023d9..4461c41054 100644
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -902,6 +902,8 @@ patterns are available:
>  
>  - `tex` suitable for source code for LaTeX documents.
>  
> +- `typescript` suitable for source code for TypeScript language.
> +

Good that you did not forget to add an entry to this list (and to
the right place).

> diff --git a/t/t4018/typescript-function-assignment b/t/t4018/typescript-function-assignment
> new file mode 100644
> index 0000000000..49c528713e
> --- /dev/null
> +++ b/t/t4018/typescript-function-assignment
> @@ -0,0 +1,4 @@
> +const RIGHT = function(one: number): Type {
> +    someMethodCall();
> +    return ChangeMe;
> +}
> diff --git a/t/t4018/typescript-interface b/t/t4018/typescript-interface
> new file mode 100644
> index 0000000000..6f3665c2af
> --- /dev/null
> +++ b/t/t4018/typescript-interface
> @@ -0,0 +1,4 @@
> +interface RIGHT {
> +  one?: string;
> +  [propName: ChangeMe]: any;
> +}
> \ No newline at end of file

I do not speak typescript, but is it important for the language that
the sources can be stored with an incomplete line at the end of the
file?  IOW, I am wondering if it is deliberate *and* matters to the
tests that some sample files end with an incomplete line while
others do not.

If that is not the case, please fix this and the next file; we do
not generally want a file with an incomplete line at the end unless
there is a compelling reason to (i.e., we do test that our tools
work with such files, and it may be convenient to ship sample input
with incomplete lines to run such tests).

As to the actual pattern and the words the patterns catch, I have no
idea if they are sensible for typescript language---folks with more
experience than myself should lend their eyeballs to review.

Thanks.


  reply	other threads:[~2024-04-05 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 18:59 [GSoC][PATCH] userdiff: add funcname regex and wordregex for typescript language Utsav Parmar
2024-03-21 12:21 ` Patrick Steinhardt
2024-03-23 15:07   ` Utsav Parmar
     [not found]   ` <CAD6u1kiaFDcyRX7-iZBb9LtoQ1F+M18UkyJuTXsQPE0YQGafmw@mail.gmail.com>
2024-03-25  7:33     ` Patrick Steinhardt
2024-03-24 17:44 ` [PATCH] userdiff: add builtin driver " Utsav Parmar
2024-03-25  7:37   ` Patrick Steinhardt
2024-03-25 17:23   ` Karthik Nayak
2024-04-04 16:38   ` [PATCH v2] " Utsav Parmar
2024-04-05 17:43     ` Junio C Hamano [this message]
2024-04-05 17:47     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqedbjvh7e.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=utsavp0213@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).