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

Join license header with historical comments #293

Merged
merged 3 commits into from
May 8, 2024

Conversation

JeodC
Copy link
Collaborator

@JeodC JeodC commented May 6, 2024

Description

Join the license header with historical comments using a separator so IDEs can correctly parse the initial comment. Also use .gitattributes to ensure all files are LF.

Git clone https://github.com/JeodC/Descent3/tree/joinedcomments to verify IDEs and building.

Related Issues

Resolves #100 and #129

Additional Comments

The following script was used:

Get-ChildItem -Path . -Include *.cpp,*.h -File -Recurse | ForEach-Object {
    $content = Get-Content $_.FullName
    
    if ($content[18] -eq '/*') {
        $content[16] = ""
        $content[17] = "--- HISTORICAL COMMENTS FOLLOW ---"
        $content[18] = ""
        $content | Set-Content $_.FullName
    }
}

@JeodC JeodC changed the title Join license header with historical commentrs Join license header with historical comments May 6, 2024
@Lgt2x
Copy link
Collaborator

Lgt2x commented May 7, 2024

.gitattributes needs narrower rules. On this branch, running git add --renormalize . changes many files including .wav and other non-text files. See documentation https://git-scm.com/docs/gitattributes for more information and examples.

@JeodC
Copy link
Collaborator Author

JeodC commented May 8, 2024

.gitattributes needs narrower rules. On this branch, running git add --renormalize . changes many files including .wav and other non-text files. See documentation https://git-scm.com/docs/gitattributes for more information and examples.

Done. Used Get-ChildItem -File -Recurse | ForEach-Object { $_.Extension } | Sort-Object -Unique to get a list of existing filetypes.

JeodC added 3 commits May 8, 2024 14:41
Join the license header with historical comments using a separator so IDEs can correctly parse the initial header.

Also use .gitattributes to ensure all files are LF.
@JeodC JeodC merged commit 7d38dde into DescentDevelopers:main May 8, 2024
10 checks passed
@JeodC JeodC deleted the joinedcomments branch May 8, 2024 19:08
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.

Move old VCS text
2 participants