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

Remove MIDI Configuration boilerplate #11151

Merged
merged 6 commits into from Aug 15, 2021
Merged

Conversation

noroadsleft
Copy link
Member

Description

Removes the MIDI configuration options and MIDI_ENABLE = no statements from keyboard-level files where MIDI is disabled. No changes in functionality, just removing code from places where it isn't needed.

This can probably go safely to the master branch, but I have it on develop for now.

Types of Changes

  • Enhancement/optimization
  • Keyboard (addition or update)

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • I have read the CONTRIBUTING document.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@stale
Copy link

stale bot commented Feb 21, 2021

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@tzarc tzarc closed this Feb 27, 2021
@tzarc tzarc deleted the branch qmk:develop February 27, 2021 20:28
@tzarc
Copy link
Member

tzarc commented Feb 27, 2021

Sorry about that, GitHub decided to delete the develop branch from upstream when we merged it, despite being told otherwise. Reopened.

@stale
Copy link

stale bot commented Jun 2, 2021

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@stale
Copy link

stale bot commented Jul 8, 2021

Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.

@fauxpark
Copy link
Member

fauxpark commented Jul 9, 2021

Looks good except for submodule changes.

@noroadsleft
Copy link
Member Author

@fauxpark Thank you, and fixed. 👍

noroadsleft and others added 5 commits August 15, 2021 00:27
Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e  '/^[ #]*MIDI_ENABLE[ \t]*=[ \t]*no/d' {} +
```

Co-Authored-By: Nick Brassel <nick@tzarc.org>
Change instances of `MIDI_ENABLE = YES` to `MIDI_ENABLE = yes`.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;MIDI_ENABLE[ \t]*=[ \t]*[Yy][Ee][Ss];MIDI_ENABLE = yes;g' {} +
```
Replace `# MIDI controls` with `# MIDI support` in keyboard-level `rules.mk` files.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*MIDI[ \t]*\(controls\|support\).*;# MIDI support;g' {} +
```
Aligns the inline comments to the length used by the QMK AVR rules.mk template.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;MIDI_ENABLE *= *yes.*;MIDI_ENABLE = yes           # MIDI support;g'  {} +
```
…files

Commands:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#\([ \t]*MIDI_ENABLE\) = yes; \1 = no ;' {} +
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;^\([ \t]*\)\(MIDI_ENABLE = no\);\2\1;' {} +
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e '/^[ #]\+MIDI_ENABLE *= *no/d' {} +
```
@tzarc tzarc merged commit 4b453dc into qmk:develop Aug 15, 2021
@noroadsleft noroadsleft deleted the clean/midi branch August 15, 2021 22:53
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
* remove keyboard-level instances of `MIDI_ENABLE = no`

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e  '/^[ #]*MIDI_ENABLE[ \t]*=[ \t]*no/d' {} +
```

Co-Authored-By: Nick Brassel <nick@tzarc.org>

* fix case-sensitivity issues on MIDI_ENABLE

Change instances of `MIDI_ENABLE = YES` to `MIDI_ENABLE = yes`.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;MIDI_ENABLE[ \t]*=[ \t]*[Yy][Ee][Ss];MIDI_ENABLE = yes;g' {} +
```

* replace `# MIDI controls` with `# MIDI support`

Replace `# MIDI controls` with `# MIDI support` in keyboard-level `rules.mk` files.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*MIDI[ \t]*\(controls\|support\).*;# MIDI support;g' {} +
```

* align inline comments

Aligns the inline comments to the length used by the QMK AVR rules.mk template.

Command:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;MIDI_ENABLE *= *yes.*;MIDI_ENABLE = yes           # MIDI support;g'  {} +
```

* remove commented instances of `MIDI_ENABLE` from keyboard `rules.mk` files

Commands:

```
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#\([ \t]*MIDI_ENABLE\) = yes; \1 = no ;' {} +
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;^\([ \t]*\)\(MIDI_ENABLE = no\);\2\1;' {} +
find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e '/^[ #]\+MIDI_ENABLE *= *no/d' {} +
```

* remove MIDI configuration boilerplate from keyboard config.h files

Co-authored-by: Nick Brassel <nick@tzarc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants