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

lint ruby drc code. #36

Merged
merged 1 commit into from
Feb 10, 2023
Merged

lint ruby drc code. #36

merged 1 commit into from
Feb 10, 2023

Conversation

atorkmabrains
Copy link
Collaborator

@atorkmabrains atorkmabrains commented Feb 2, 2023

Fixes #14

Please don't merge this PR before the other PRs.

  • Tests pass
  • Appropriate changes to README are included in PR

@atorkmabrains atorkmabrains requested a review from proppy February 2, 2023 15:44
@proppy
Copy link
Member

proppy commented Feb 2, 2023

can you invert the order of the commits in the history in order to:

  • only keep in this PR: the changes that add lint to ci w/ dualgate modification to pass the checks
  • rebase the other PRs to include the corresponding lint modification for each deck check

@proppy
Copy link
Member

proppy commented Feb 2, 2023

That will make it easier to review things concurrently.

@atorkmabrains
Copy link
Collaborator Author

@FaragElsayed2 Could you please do that? My bad.

@atorkmabrains
Copy link
Collaborator Author

@proppy If you accept all the other open PRs and then this one in that order, everything will fall in place as you want. The rest of the tables will be correct moving forward and the new tables will be lint clean.

We won't be able to work on this until Sunday. If you can do the above that would be really helpful to speed up the process on our end.

@FaragElsayed2
Copy link
Collaborator

@proppy I have removed all other files as requested and only kept dualgate drc file and linting checks for ruby files.

@FaragElsayed2
Copy link
Collaborator

@proppy And @mithro Please add me as a collaborator for this project.

@proppy
Copy link
Member

proppy commented Feb 6, 2023

@proppy And @mithro Please add me as a collaborator for this project.

please ask mithro@ directly (let's keep the comment in this issue about the actual review)

@proppy
Copy link
Member

proppy commented Feb 6, 2023

@proppy I have removed all other files as requested and only kept dualgate drc file and linting checks for ruby files.

Thanks! that makes it a lot easier to review. Can you rebase 531323a on top of the main branch to clean up the history?

@proppy
Copy link
Member

proppy commented Feb 6, 2023

@proppy If you accept all the other open PRs and then this one in that order, everything will fall in place as you want. The rest of the tables will be correct moving forward and the new tables will be lint clean.
We won't be able to work on this until Sunday. If you can do the above that would be really helpful to speed up the process on our end.

I prefer to review the PR as it is currently as it will allow us to review each further DRC PR idependently with the lint workflow enabled.

Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
.rubocop.yml Show resolved Hide resolved

if $report
logger.info("GF180MCU Klayout DRC runset output at: %s" % [$report])
report("DRC Run Report at", $report)
logger.info(format('GF180MCU Klayout DRC runset output at: %s', $report))
Copy link
Member

Choose a reason for hiding this comment

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

string interpolation?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done

else
BALL = "true"
end # BALL
BALL = if $ball == 'false'
Copy link
Member

@proppy proppy Feb 6, 2023

Choose a reason for hiding this comment

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

do we want to default to be true here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes

Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the original structure of the code then and keep any config refactoring for #37?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

Copy link
Member

Choose a reason for hiding this comment

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

Are you intentionally keeping this a string rather that converting it to a boolean? I would assume that the rest of the rules would prefer to test this directly rather than doing string comparison?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done, bool check function is used for string to boolean conversion.
image

else
GOLD = "true"
end # GOLD
GOLD = if $gold == 'false'
Copy link
Member

Choose a reason for hiding this comment

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

do we want to default to be true here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes

Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the original structure of the code then and keep any config refactoring for #37?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see, are you intentionally keeping this a string rather that converting it to a boolean? I would assume that the rest of the rules would prefer to test this directly rather than doing string comparison?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done, bool check function is used for string to boolean conversion.

image

@atorkmabrains
Copy link
Collaborator Author

@FaragElsayed2 FaragElsayed2 force-pushed the lint_ruby branch 2 times, most recently from 9f22fa4 to ed6e97a Compare February 8, 2023 08:27
@atorkmabrains
Copy link
Collaborator Author

@proppy I think @FaragElsayed2 has already addressed most of your concerns. Could you please merge the PR and open issues with any remaining issues as we agreed?

@proppy
Copy link
Member

proppy commented Feb 8, 2023

@atorkmabrains I agree that most of the comment have been addressed, but as suggested before I'd like the history to be squashed before merging (there is currently an history of 106 commits which are mostly unrelated to this change)

@proppy proppy mentioned this pull request Feb 8, 2023
2 tasks
@atorkmabrains
Copy link
Collaborator Author

@FaragElsayed2 Could you please squish the commits history?

@atorkmabrains
Copy link
Collaborator Author

@proppy Commits are squashed to one commit as requested.

@atorkmabrains
Copy link
Collaborator Author

@proppy Could you please let me know if there is anything else?

@proppy
Copy link
Member

proppy commented Feb 9, 2023

It looks good, but please use a more descriptive commit message (no need to mention it's in one commit)

Copy link
Member

@proppy proppy left a comment

Choose a reason for hiding this comment

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

Just some nits left above better handing of the conditions per layers. But feel free to address them in a separate change.

Thanks for the hard work on this.

@FaragElsayed2
Copy link
Collaborator

@proppy I think we have done with all issues, Could you please merge ?

@proppy
Copy link
Member

proppy commented Feb 9, 2023

Sure can you make sure to address it the last remaining comment and reword the commit message?

Thanks in advance

@FaragElsayed2
Copy link
Collaborator

@proppy Done

@atorkmabrains
Copy link
Collaborator Author

Thanks @FaragElsayed2

@atorkmabrains
Copy link
Collaborator Author

@proppy Anything else?

@atorkmabrains
Copy link
Collaborator Author

@proppy Anything else?

@atorkmabrains
Copy link
Collaborator Author

@proppy Could you please merge?

@proppy
Copy link
Member

proppy commented Feb 10, 2023

@atorkmabrains yes, sorry I was just waiting for the CI to pass.

Thanks for all the hard work on this!

@proppy proppy merged commit 0c999cc into google:main Feb 10, 2023
@atorkmabrains atorkmabrains deleted the lint_ruby branch February 27, 2023 09:27
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.

Add code linting for ruby code as part of actions
3 participants