Page MenuHomePhabricator

Fix handling of empty line/column in linter tests
Needs ReviewPublic

Authored by joshuaspence on May 21 2019, 8:02 AM.
Tags
None
Referenced Files
F14016792: D20532.id48963.diff
Mon, Nov 4, 10:43 AM
F14016791: D20532.id48962.diff
Mon, Nov 4, 10:43 AM
F14016790: D20532.id.diff
Mon, Nov 4, 10:43 AM
F14014326: D20532.diff
Sun, Nov 3, 1:57 AM
F13983747: D20532.id48963.diff
Sun, Oct 20, 8:28 AM
F13980292: D20532.id48962.diff
Sat, Oct 19, 9:35 AM
Unknown Object (File)
Sep 29 2024, 8:01 AM
Unknown Object (File)
Sep 29 2024, 6:27 AM
Subscribers

Details

Summary

Ref T6854. I tried addressing D11176#inline-49218 before landing D11176: Modify the `lint-test` file format to allow for more powerful assertions but ended up breaking linter assertions without line/column numbers (e.g. error::). This diff fixes it and also adds name to the field list.

Test Plan

Ran all linter unit tests.

Diff Detail

Repository
rARC Arcanist
Branch
lint1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22839
Build 31332: Run Core Tests
Build 31331: arc lint + arc unit

Event Timeline

Remove description since it can span multiple lines

Unrelated but I noticed that ArcanistBundleTestCase::testGitRepository fails locally for me when running arc unit --everything:

EXCEPTION (CommandException): Command failed with error #1!
COMMAND
git -c user.name='unit-test' -c user.email='unit-test@phabricator.com' commit -m 'Convert \n newlines to \r\n newlines.'

STDOUT
On branch master
Untracked files:
    ._image.png
    ._image_2.png
    ._image_3.png

nothing added to commit but untracked files present


STDERR
(empty)
#0 /home/josh/workspace/personal/libphutil/src/future/exec/execx.php(17): ExecFuture->resolvex()
#1 /home/josh/workspace/personal/arcanist/src/parser/__tests__/ArcanistBundleTestCase.php(179): execx('git -c user.nam...', 'unit-test', 'unit-test@phabr...', 'Convert \\n newl...')
#2 /home/josh/workspace/personal/arcanist/src/parser/__tests__/ArcanistBundleTestCase.php(85): ArcanistBundleTestCase->runGitRepositoryTests(Object(PhutilDirectoryFixture))
#3 /home/josh/workspace/personal/arcanist/src/unit/engine/phutil/PhutilTestCase.php(492): ArcanistBundleTestCase->testGitRepository()
#4 /home/josh/workspace/personal/arcanist/src/unit/engine/PhutilUnitTestEngine.php(69): PhutilTestCase->run()
#5 /home/josh/workspace/personal/arcanist/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php(148): PhutilUnitTestEngine->run()
#6 /home/josh/workspace/personal/arcanist/src/workflow/ArcanistUnitWorkflow.php(170): ArcanistConfigurationDrivenUnitTestEngine->run()
#7 /home/josh/workspace/personal/arcanist/scripts/arcanist.php(394): ArcanistUnitWorkflow->run()
#8 {main}