You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
document the correct copyright header in CONTRIBUTING.adoc
add missing copyright headers in non-Java files
When reviewing, please particularly check that I haven't added a copyright header to something that shouldn't have one. The areas I wasn't sure about were:
the spec asciidoc files - it looks like we build the spec with an Apache license, except for when we do a final release when we use the EFSL, so guessed that the Apache license for the source files is correct.
the files in ide-support and jboss_community_formatter.xml - I don't know how these were developed, they may have come form another project and probably started from the defaults of the the software that creates them?
I haven't changed any headers on existing files and I've used the format that includes the original author's name since some of the files pre-date involvement with the Eclipse Foundation.
Script used to generate headers
It's a bit rough, some files needed fixed up by hand, particularly XML ones since the <?xml line must be first if present.
#!/bin/bashformat_header () {
local top=$1local prefix=$2local bottom=$3local owner=$4local year=$5
commands=()
if [[ -n"$top" ]];then
commands+=("-e""1i ${top}")
fiif [[ -n"$prefix" ]];then
commands+=("-e""s%^%${prefix}%")
fiif [[ -n"$bottom" ]];then
commands+=("-e""\$a ${bottom}")
fi
sed "${commands[@]}"<<ENDCopyright (c) ${year}${owner} and othersThis program and the accompanying materials are made available under theApache Software License 2.0 which is available at:https://www.apache.org/licenses/LICENSE-2.0.SPDX-License-Identifier: Apache-2.0END
}
add_header() {
echo"$1"| cat - "$2"> tmp.txt
mv tmp.txt "$2"
}
missing_extensions=()
forFin$(grep -h ????? target/rat.txt | sed -e 's| !????? ||');do
data=$(git log --format="%ae %as"$F| tail -1)if [[ $data=~ redhat ||$data=~ starksm ||$data=~ pmuir ||$data=~ antoine ||$data=~ marlow ||$data=~ gegastaldi ||$data=~ ladicek ]] ;then
company="Red Hat, Inc."elif [[ $data=~ ibm ]] ;then
company="IBM Corp."elseecho"No known owner for $F, who is $data"fi
year=$(echo $data| cut -d '' -f 2 | cut -d '-' -f 1)
filename=$(basename "$F")
extension="${filename##*.}"if [[ $extension== asciidoc ||$extension== adoc ]] ;then
header=$(format_header "////""""////""$company""$year")elif [[ $extension== xml ||$extension== html ||$extension== md ]] ;then
header=$(format_header "<!--""""-->""$company""$year")elif [[ $extension== yml ||$extension== Gemfile ||$extension== importorder ]] ;then
header=$(format_header """# """"$company""$year")elif [[ $extension== java ||$extension== policy ]] ;then
header=$(format_header "/*"" * ""\\ */""$company""$year")else
header="Unknown format: $extension"
missing_extensions+=("$extension")
fi
add_header "$header""$F"donedeclare -A uniq_ext
forextin"${missing_extensions[@]}"do
uniq_ext[$ext]=0
doneecho"missing extensions: ""${!uniq_ext[@]}"
I think we really should get rid of api/src/ide (which contains jboss_community_formatter.xml). The ide-config module was added by @manovotn in #731 (copied from Weld, which coped it from Quarkus, where it was an original creation, albeit derived -- if not just copied -- from the default Eclipse format IIUC).
I think we really should get rid of api/src/ide (which contains jboss_community_formatter.xml). The ide-config module was added by @manovotn in #731 (copied from Weld, which coped it from Quarkus, where it was an original creation, albeit derived -- if not just copied -- from the default Eclipse format IIUC).
True, +1 for removing that; I didn't even know it's there, else I'd have removed that as part of the PR you linked :)
I was a bit unsure whether the policy format supports /* ... */ comments, because the documentation doesn't mention comments explicitly, it just shows // comments in some examples. However, the implementation of sun.security.provider.PolicyParser shows that both comment styles are supported, so I guess we should be fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
CONTRIBUTING.adocWhen reviewing, please particularly check that I haven't added a copyright header to something that shouldn't have one. The areas I wasn't sure about were:
docsdirectory which builds https://jakartaee.github.io/cdi/.githubdirectryide-supportandjboss_community_formatter.xml- I don't know how these were developed, they may have come form another project and probably started from the defaults of the the software that creates them?I haven't changed any headers on existing files and I've used the format that includes the original author's name since some of the files pre-date involvement with the Eclipse Foundation.
Script used to generate headers
It's a bit rough, some files needed fixed up by hand, particularly XML ones since the
<?xmlline must be first if present.Fixes #741