-
Notifications
You must be signed in to change notification settings - Fork 4
lint: collect unused l10n tokens #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
39ac758
to
779caa6
Compare
lib/lint/unused/l10n.js
Outdated
if (!tokenNames[tokenName]) { | ||
flow.warn({ | ||
file: dictFileName, | ||
message: tokenName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be something useful, e.g. Path ${tokenName} is never used
{ | ||
var tokenNames = unusedL10nTokens[dictFileName]; | ||
|
||
dictFileName = dictFileName.slice(process.cwd().length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require('path').relative(process.cwd(), dictFileName)
?
FileName
-> Filename
}); | ||
} | ||
|
||
tasks.push(task); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tasks.push({
name: 'unused l10n tokens at ' + dictFileName,
warnings: Object.keys(tokenNames).map(function(name) {
return { file: name };
})
})
Uh oh!
There was an error while loading. Please reload this page.