-
Notifications
You must be signed in to change notification settings - Fork 32
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
flip-flop ! (template string formatting is unstable) #13
Comments
It's miscounting the length of the template string. I'll look into it. For now, the workaround is: class X {
compile(template: ViewDefinition): Promise<ProtoViewDto> {
var tplPromise = this._templateLoader.load(template);
return PromiseWrapper.then(
tplPromise, (el) => this._compileTemplate(template, el, ProtoViewDto.COMPONENT_VIEW_TYPE),
(e) => {
var msg = `Failed to load the template for "${template.componentId}": ${e}`;
throw new BaseException(msg);
});
}
} |
I have "fixed" this by adding a space before the ':' |
Thanks for looking into this. |
to consider: we could improve the error reporting here by double-formatting inside gulp-clang-format, to ensure that the proposed formatting change is stable. If we find that the second formatting pass produces a different answer, we could silence the error for that file. |
@alexeagle I'll see if I can do something about this, this happens more often than I thought. I don't think changing |
👍 |
I've just released v1.0.26 that should fix these issues for template literals. |
Thanks ! |
flip:
flop:
... infinite loop !
as it changes in every single run, the format check also fails on every single run !
/cc @mprobst
The text was updated successfully, but these errors were encountered: