Skip to content
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

Don't break 12e+34 into 12e + 34 #1309

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Nov 21, 2024

No description provided.

-1e6,
-1.23e-45,
3.539537889086625e+24,
3.539537889086625E+24,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if buildifier should default to lowercase e and no plus sign for positive exponents (that's what pyformat does).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it makes sense to standardize this. Changing to lowercase e can affect existing users (so it's worth mentioning in the release notes), but it should be easy to rollout.

Copy link
Member

@vladmos vladmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand it correctly that it allows some invalid expressions like 1e2e3 or 1.2e3.4? Not insisting that it should be fixed here, maybe it's actually better to format the rest than fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants