-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
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.
- What is the file
go.sum
? Does it need to be included? - That eight space tab setting is pretty insane. A few levels of indentation and you'll be hitting the right hand margin. Is that necessary? Four spaces is more standard, but maybe eight spaces is a
go
thing.
I unclicked the checkbox titled "Tests have been added and/or modified to cover the changes in this PR" since I don't see any tests here. If checkboxes do not apply they can be deleted, but they should not be checked if they are not satisfied. |
@jsf9k yes go.sum needs to be included as go is expecting it. it's just empty at the moment because I don't have any modules installed to the project yet. think of it as similar to Which file do you see the 8 spaces tab? |
@jsf9k i actually do have a test i added. It's in |
I have no idea how I missed that. Sorry! |
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.
I noted a few items to get you started:
All the |
@jsf9k it looks like my local tab indentations are translating to 8 spaces in Github for some reason (They actually look like 4 in VSCode locally). I just pushed a commit where i used spaces instead in the Makefile: 9397e89. I will continue to investigate. But yes I agree 8 is way too much. |
@jsf9k after doing more research, it looks like the default for tab size in Github is set to 8. if you append As previously mentioned, locally on my code editor, it looks like 4 spaces. I did some research and found this: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-tab-size-rendering-preference I couldn't find a way to manage tab size at the repo level but you can update it at a user level. however it'll visually update all tab sizes in all repos that you view |
You should be using spaces, not tab characters. You should be able to tell your editor to interpret a tab keypress as four spaces. |
@jsf9k I'm using the golang standard gofmt to format my project which is strongly recommended. I tried looking for a way i can get the formatter to use spaces instead of indentations. gofmt is very opinionated and doesn't have flexible configuration. If I try to use spaces, the formatter will automatically replace them with indentations. They used to have a After some research, tabs for indentation is the official Golang recommendation: Please let me know your thoughts and how you'd like me to move forward. Thanks! |
Go ahead and let Interesting that Go has decided to re-ignite this conflict. |
done! |
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.
Please add an appropriate CodeQL configuration. You can crib the cisagov/skeleton-python-library one and just update the language configuration appropriately (and optionally change the cron
configuration to avoid overlap).
@mcdonnnj done! |
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.
Please add a test
job to the GitHub Actions workflow. I see that there is make test
functionality so I imagine it should be straightforward to add something similar to the build
workflow much like in the Python skeleton. If you feel like this is too much please create an issue to log this as future work but I strongly recommend this work gets done in the near future to provide good guardrails for pull requests.
|
443b4e5
to
c2c2e36
Compare
c2c2e36
to
619b4f5
Compare
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.
This looks pretty solid. I think it would be helpful to make a build
job in the GitHub Actions workflow that creates a binary and uploads that as an artifact, but that is not strictly necessary right now. Maybe make an issue to track that as future work?
Awesome, Sounds good. Yes I was planning on working on that effort in the near future. I'll create an issue. |
Initialize Con-PCA Tasks utilizing Golang
🗣 Description
Note: I placed the golang script in the root of the project instead of in an
src
folder due to golang project layout standards:https://github.com/golang-standards/project-layout#src
💭 Motivation and context
To build a scalable, more robust version of the con-pca's task scheduler.
🧪 Testing
ran
go test -v ./...
ormake test
✅ Pre-approval checklist
to reflect the changes in this PR.
✅ Pre-merge checklist
✅ Post-merge checklist