Automation, Lint'ing, etc Mega Refactor #208
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This turned out to be a lot larger than I thought because it turns out that, although I had the
golang
toolchain downloaded for Visual Studio code, it was not actually enabled/hooked into my environment, which is a huge bummer.The biggest impactful change code-wise is, in fact, the most annoying and the least impactful in value (just caused a TON of changes) and that was the Go variable/class/etc naming convention. By default, Go is supposed to automatically update this as you type, assuming your tools are set up correctly.
The other reason why this PR is so large... The problem is introducing these language static and lint checkers later on is that in order to introduce them, you also need to fix ALL associated issues that they call out.
To give perspective, I created a PR for everything but the Go static checks and lining, and this is what that looks like:
deepgram/deepgram-python-sdk#394
Prerequisites
Supported Environment:
In order to expedite implementation this feature, this does require the following to be installed:
Once you have docker installed, all other dependencies can be installed using:
NOTE: Just like this sounds, it will install things on your local laptop.
Significant Changes
.md
files changingTo Run Locally:
You need to have cmake installed. Then just run:
make help
Kinda Breaking Changes
So because certain response variables, class names, etc will change, this is technically a breaking change. After discovering my toolchain wasn't connected, I knew going into this that would be the case. There are no logic or flow breaking changes, they are strictly just variable, class, etc names that changed because of the lining.
In order to minimize the impact to code, I created some
sed
replace scripts which will automatically handle the update of these response, class, etc names. This should work for the majority of users and only specifically target updating names and adjusting pointers.Just run these updates on your code (or you can make the changes yourself in your IDE... or if you want to really do it the hard way, do it all by hand).
Types of changes
What types of changes does your code introduce to the community Go SDK?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
All examples were tested to make sure nothing is broken.