Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Switch the pretty output to use colons to separate file:line:char so that lines are clickable in terminals#20736

Merged
mhegazy merged 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
orta:use_colors_pretty_outputorta/TypeScript:use_colors_pretty_outputCopy head branch name to clipboard
Jan 5, 2018
Merged

Switch the pretty output to use colons to separate file:line:char so that lines are clickable in terminals#20736
mhegazy merged 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
orta:use_colors_pretty_outputorta/TypeScript:use_colors_pretty_outputCopy head branch name to clipboard

Conversation

@orta

@orta orta commented Dec 16, 2017

Copy link
Copy Markdown
Contributor

When tsc, with pretty enabled, gives an error messages they look like this:

source/commands/init/state-setup.ts(21,40): error TS2339: Property 'bold' does not exist on type 'typeof "/Users/orta/dev/projects/danger/danger-js/node_modules/chalk/types/index"'.

21     header: (msg: String) => say(chalk.bold("\n## " + msg + "\n")),

You cannot directly click onsource/commands/init/state-setup.ts(21,40): to jump directly to the line of code, which is ideal. The format, by convention, for that syntax is file:line:char - which this PR switches the message format to.

For example, most testing libraries will output in this format (though I think this just comes from node's exception handling, but you get the point)
screen shot 2017-12-16 at 5 52 08 pm


I couldn't find an issue for this, happy to write one up, but it seemed simple enough to just write a PR instead.

@thetrompf

Copy link
Copy Markdown

Actually the current format is clickable inside VScode, but this way it works both in sublime and atom. Unfortunately I cannot verify if this works in VSCode tonight, maybe someone else can verify it?

@orta

orta commented Dec 17, 2017

Copy link
Copy Markdown
Contributor Author

It does, yes:

screen shot 2017-12-17 at 5 37 11 pm

@thetrompf

Copy link
Copy Markdown

Cool! Carry on then :)

@DanielRosenwasser

Copy link
Copy Markdown
Member

@mjbvz @billti @mhegazy --pretty output was never meant to be parsed, but do VS/VS Code use it for anything right now?

@DanielRosenwasser

Copy link
Copy Markdown
Member

Sorry, the baselines are now out of date because I just merged in #20416.

@mjbvz

mjbvz commented Dec 19, 2017

Copy link
Copy Markdown
Contributor

@DanielRosenwasser The VS Code TS extension doesn't use --pretty

@orta orta force-pushed the use_colors_pretty_output branch 3 times, most recently from 17260b2 to 9c67064 Compare December 19, 2017 22:00
@orta

orta commented Dec 19, 2017

Copy link
Copy Markdown
Contributor Author

Cool - that should be it updated & rebased 👍

@billti

billti commented Dec 19, 2017

Copy link
Copy Markdown
Member

VS doesn't appear to use that option.

@orta orta force-pushed the use_colors_pretty_output branch from 9c67064 to 2be5bae Compare December 19, 2017 22:56
@mhegazy mhegazy merged commit 5865494 into microsoft:master Jan 5, 2018
@mhegazy

mhegazy commented Jan 5, 2018

Copy link
Copy Markdown
Contributor

thanks @orta! and sorry for the delay.

@orta

orta commented Jan 5, 2018

Copy link
Copy Markdown
Contributor Author

You're welcome, it was over the holidays, so low expectation 👍

@orta orta deleted the use_colors_pretty_output branch April 28, 2018 21:13
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.