Shebang Removal While Adding Copyright Header in Shell Scripts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện cấu hình Spotless Maven được cung cấp trên các shell script, sử dụng Maven 3.8.8 và các thiết lập shell licenseHeader. Theo dõi cách setLicenseHeaderYearsFromGitHistory và skipLinesMatching tương tác với nhau, sau đó xác minh rằng việc áp dụng formatter vẫn giữ nguyên shebang của từng script.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- summary of problem
I’m working on a project with shell scripts and trying to add a copyright header that includes the year range from the Git history using the setLicenseHeaderYearsFromGitHistory property.
The issue I’m facing is that the shebang (#!/bin/bash, etc.) is getting removed from the script files in the process. It seems there's something wrong with the code flow
- Gradle or Maven version - Maven 3.8.8
- spotless version - 2.43.0
- operating system and version - MacOS 14
- copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<setLicenseHeaderYearsFromGitHistory>true</setLicenseHeaderYearsFromGitHistory>
<upToDateChecking>
<enabled>false</enabled>
</upToDateChecking>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<licenseHeader>
<content>
<![CDATA[
/**
****************************************************************************
** Copyright Header
****************************************************************************
**/]]>
</content>
<delimiter>package</delimiter>
</licenseHeader>
</java>
<shell>
<includes>
<include>**/*.sh</include>
</includes>
<licenseHeader>
<content>
<![CDATA[
#---------------------------------------------------------------------------
# Copyright Header
#---------------------------------------------------------------------------]]>
</content>
<delimiter>## Start</delimiter>
<skipLinesMatching>#\!/bin/sh</skipLinesMatching>
</licenseHeader>
</shell>
</configuration>
</plugin>
- copy-paste the full content of any console errors emitted by
gradlew spotless[Apply/Check] --stacktrace- maven plugin
Thanks in advance
- Ngôn ngữ chính
- Java
- Star
- 5.7k
- Fork
- 560
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 43
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của diffplug/spotless
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Tất cả issue của diffplug/spotless
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Đang mở1.0.0-alpha2 Type/Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/dpdp-accelerator#272 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
apache/rocketmq-dashboard#4860 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
infinispan/infinispan#18150 ·