PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.85k stars 4.61k forks source link

Unify the file extension for YAML files #4885

Open SunBlack opened 3 years ago

SunBlack commented 3 years ago

For a PR, I first searched for all file extensions used by PCL:

git ls-tree -r HEAD --name-only | sed -e 's/.*\.//' | sed -e 's/.*\///' | sort | uniq -c | sort -rn

After calling this command, you will see that there are files with yaml and yml as extension. In general: Both extensions are correct for YAML, but nevertheless I think we should unify it.

Find all YAML files

git ls-tree -r HEAD --name-only | grep -E '.*\.(yaml|yml)'

Result:

.ci/azure-pipelines/azure-pipelines.yaml
.ci/azure-pipelines/build/macos.yaml
.ci/azure-pipelines/build/ubuntu.yaml
.ci/azure-pipelines/build/ubuntu_indices.yaml
.ci/azure-pipelines/build/windows.yaml
.ci/azure-pipelines/docs-pipeline.yaml
.ci/azure-pipelines/documentation.yaml
.ci/azure-pipelines/env.yml
.ci/azure-pipelines/formatting.yaml
.ci/azure-pipelines/release.yaml
.ci/azure-pipelines/tutorials.yaml
.dev/docker/perception_pcl_ros/kinetic_rosinstall.yaml
.dev/docker/perception_pcl_ros/melodic_rosinstall.yaml
.github/FUNDING.yml
.github/ISSUE_TEMPLATE/config.yml
.github/stale.yml
doc/tutorials/content/sources/ground_based_rgbd_people_detection/data/trainedLinearSVMForPeopleDetectionWithHOG.yaml
people/data/trainedLinearSVMForPeopleDetectionWithHOG.yaml

For example, is there a reason why env.yml has yml as file extension but formatting.yaml has yaml?

As the Github names seems to have fixed extensions I suggest to use always yml for all YAML files.

kunaltyagi commented 3 years ago

Some files were created manually, and others were created by azure/GitHub. The auto created files are yml and others are yaml

mvieth commented 2 years ago

While it would be nice to only have either yml or yaml extensions, I don't see a big problem with mixing them. However, changing the extensions (renaming the files) now might lead to some headaches (files not found etc). FUNDING.yml, config.yml, and stale.yml indeed seem to only work with the yml extension, not the yaml extension. In contrast to that, yaml is the officially recommended extension. As a compromise, we could check whether we can change env.yml to env.yaml. Then we would use the yaml extension everywhere except for the GitHub files