cfmt
1.0.0
CFMT เป็นเครื่องมือในการห่อความคิดเห็นในระยะเวลาที่กำหนดไปยังบรรทัดใหม่
go get -u github.com/alexkohler/cfmt
หมายเหตุ : CFMT ต้องการ gofmt
เช่นเดียวกับเครื่องมือ Anaylsis แบบคงที่อื่น ๆ (เช่น Golint, Go Vet), CFMT สามารถเรียกใช้กับชื่อไฟล์หนึ่งชื่อหรือมากกว่าหนึ่งรายการไดเรกทอรีหรือแพ็คเกจที่ตั้งชื่อตามเส้นทางนำเข้า CFMT ยังรองรับ ... Wildcard
cfmt [flags] files/directories/packages
cfmt จะพิมพ์เฉพาะการเปลี่ยนแปลงที่จะทำ แต่จะไม่แก้ไขไฟล์อินพุต cfmt จะห่อหุ้มบรรทัดใหม่หรือเข้าร่วมบรรทัดที่มีอยู่ตามความเหมาะสม ดูสิ่งต่อไปนี้ก่อน/Afters ของการรัน cfmt -m=100 :
ก่อน
// I am a long comment that is over 100 characters long. I should probably wrap to a new line.หลังจาก
// I am a long comment that is over 100 characters long. I should probably wrap
// to a new line.ก่อน
// I am a long comment that is over 100 characters long. I should probably wrap below to the
// rest of the comment.หลังจาก
// I am a long comment that is over 100 characters long. I should probably wrap
// below to the rest of the comment.ก่อน
//I am a long comment that starts without a space and is over 100 characters long. When I wrap, I should still start without a spaceหลังจาก
//I am a long comment that starts without a space and is over 100 characters
//long. When I wrap, I should still start without a space cfmt ละเว้นความคิดเห็นบล็อก ( /* */ ) และความคิดเห็น "จัดกลุ่ม" ตามความยาว 10 (เช่น 10+ สายต่อเนื่องเริ่มต้นด้วย // )
ยินดีต้อนรับการร้องขอ!
หากคุณสนุกกับ CFMT ลองดูเครื่องมือ Anaylsis แบบคงที่อื่น ๆ ของฉัน!