Skip to content

compiletest should check for possible typos in annotated test directives #83551

Closed
@klensy

Description

@klensy
Contributor

This should help with things like #83348 (comment)
Levenshtein distance with list of known directives will be enough?

Activity

klensy

klensy commented on Mar 27, 2021

@klensy
ContributorAuthor

@rustbot label: A-testsuite

added
A-testsuiteArea: The testsuite used to check the correctness of rustc
on Mar 27, 2021
osa1

osa1 commented on Mar 27, 2021

@osa1
Contributor

Levenshtein distance with list of known directives will be enough?

Is this to distinguish an ordinary comment from a directive?

klensy

klensy commented on Mar 27, 2021

@klensy
ContributorAuthor

@osa1
Yes, this is the first idea that came into my mind.

added
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Dec 17, 2023
jieyouxu

jieyouxu commented on Feb 17, 2024

@jieyouxu
Member

This is easier if/when we port over all current // directives in all test suites and modes over to use ui_test-style //@ directives, so that it is easier to detect between regular comments and directives.

Other bootstrap tools like tidy should also probably use something else to distinguish them from regular comments. Otherwise, trying to check between a valid directive vs comment is really cursed, and comments like

// testing testing one two three
// ignore-test is a very useful
// directive to have in compiletest

gets treated as // ignore-test, making it quite surprising.

added a commit that references this issue on Mar 9, 2024

Rollup merge of rust-lang#121561 - jieyouxu:compiletest-directive-typ…

0953296
added a commit that references this issue on Mar 10, 2024

Rollup merge of rust-lang#121561 - jieyouxu:compiletest-directive-typ…

b928e12
added a commit that references this issue on Mar 10, 2024

Auto merge of rust-lang#121561 - jieyouxu:compiletest-directive-typo-…

af69f4c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Enselic@osa1@klensy@jieyouxu@rustbot

      Issue actions

        compiletest should check for possible typos in annotated test directives · Issue #83551 · rust-lang/rust