Skip to content

Update Go development environment, enhance linting and minor CI tweaks #25

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

Merged
merged 11 commits into from
Dec 9, 2024

Conversation

chrisreddington
Copy link
Collaborator

@chrisreddington chrisreddington commented Dec 9, 2024

This PR introduces several changes:

  • Brings consistency to the GolangCI configuration by adding a symlink for the VS Code environment, pointing to the config used in CI. This brings additional linters and adjusted settings to the local deve environment.
  • Minor tweaks to the development environment for Go with updated devcontainer and VSCode settings.
  • Fixes GoSec linting issue G115 by validating triangle count range in the WriteSTLBinary function.
  • Moves the test coverage results from PR comments to the GitHub Action Job Summary to reduce noise in PRs

Fixes #15

Copy link

github-actions bot commented Dec 9, 2024

Code Coverage Report

github.com/github/gh-skyline/ascii/generator.go:19:		GenerateASCII			87.1%
github.com/github/gh-skyline/ascii/generator.go:87:		sortContributionDays		85.0%
github.com/github/gh-skyline/ascii/generator.go:127:		getBlockType			100.0%
github.com/github/gh-skyline/ascii/generator.go:146:		getBlock			100.0%
github.com/github/gh-skyline/ascii/text.go:31:			centerText			100.0%
github.com/github/gh-skyline/errors/errors.go:28:		Error				100.0%
github.com/github/gh-skyline/errors/errors.go:36:		New				100.0%
github.com/github/gh-skyline/errors/errors.go:46:		Wrap				100.0%
github.com/github/gh-skyline/errors/errors.go:69:		Is				100.0%
github.com/github/gh-skyline/errors/errors.go:78:		Unwrap				100.0%
github.com/github/gh-skyline/github/client.go:28:		NewClient			100.0%
github.com/github/gh-skyline/github/client.go:33:		GetAuthenticatedUser		100.0%
github.com/github/gh-skyline/github/client.go:48:		FetchContributions		94.4%
github.com/github/gh-skyline/github/client.go:111:		GetUserJoinYear			93.3%
github.com/github/gh-skyline/logger/logger.go:23:		String				100.0%
github.com/github/gh-skyline/logger/logger.go:44:		GetLogger			100.0%
github.com/github/gh-skyline/logger/logger.go:59:		SetLevel			100.0%
github.com/github/gh-skyline/logger/logger.go:66:		logf				91.7%
github.com/github/gh-skyline/logger/logger.go:90:		Debug				100.0%
github.com/github/gh-skyline/logger/logger.go:95:		Info				100.0%
github.com/github/gh-skyline/logger/logger.go:100:		Warning				0.0%
github.com/github/gh-skyline/logger/logger.go:105:		Error				100.0%
github.com/github/gh-skyline/main.go:103:			init				100.0%
github.com/github/gh-skyline/main.go:113:			main				0.0%
github.com/github/gh-skyline/main.go:121:			formatYearRange			100.0%
github.com/github/gh-skyline/main.go:129:			generateOutputFilename		50.0%
github.com/github/gh-skyline/main.go:142:			generateSkyline			72.5%
github.com/github/gh-skyline/main.go:219:			defaultGitHubClient		0.0%
github.com/github/gh-skyline/main.go:228:			fetchContributionData		87.5%
github.com/github/gh-skyline/main.go:245:			parseYearRange			86.7%
github.com/github/gh-skyline/main.go:272:			validateYearRange		100.0%
github.com/github/gh-skyline/main.go:284:			openGitHubProfile		100.0%
github.com/github/gh-skyline/stl/generator.go:15:		GenerateSTL			100.0%
github.com/github/gh-skyline/stl/generator.go:29:		GenerateSTLRange		66.7%
github.com/github/gh-skyline/stl/generator.go:77:		validateInput			88.9%
github.com/github/gh-skyline/stl/generator.go:93:		calculateDimensions		87.5%
github.com/github/gh-skyline/stl/generator.go:114:		findMaxContributions		100.0%
github.com/github/gh-skyline/stl/generator.go:127:		findMaxContributionsAcrossYears	100.0%
github.com/github/gh-skyline/stl/generator.go:147:		generateModelGeometry		94.7%
github.com/github/gh-skyline/stl/generator.go:188:		generateBase			44.4%
github.com/github/gh-skyline/stl/generator.go:205:		generateText			58.3%
github.com/github/gh-skyline/stl/generator.go:228:		generateLogo			44.4%
github.com/github/gh-skyline/stl/generator.go:243:		estimateTriangleCount		100.0%
github.com/github/gh-skyline/stl/generator.go:260:		generateColumnsForYearRange	72.7%
github.com/github/gh-skyline/stl/generator.go:281:		CreateContributionGeometry	80.0%
github.com/github/gh-skyline/stl/geometry/assets.go:16:		writeTempFont			62.5%
github.com/github/gh-skyline/stl/geometry/assets.go:47:		getEmbeddedImage		56.2%
github.com/github/gh-skyline/stl/geometry/geometry.go:46:	NormalizeContribution		100.0%
github.com/github/gh-skyline/stl/geometry/geometry.go:66:	CreateContributionGeometry	92.3%
github.com/github/gh-skyline/stl/geometry/geometry.go:92:	CalculateMultiYearDimensions	100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:11:		CreateQuad			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:24:		CreateCuboidBase		100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:31:		CreateColumn			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:44:		CreateCube			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:61:		createBox			100.0%
github.com/github/gh-skyline/stl/geometry/text.go:65:		Create3DText			0.0%
github.com/github/gh-skyline/stl/geometry/text.go:112:		renderText			0.0%
github.com/github/gh-skyline/stl/geometry/text.go:165:		GenerateImageGeometry		83.3%
github.com/github/gh-skyline/stl/geometry/text.go:190:		renderImage			84.6%
github.com/github/gh-skyline/stl/geometry/text.go:245:		isPixelActive			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:12:		validateVector			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:22:		calculateNormal			88.9%
github.com/github/gh-skyline/stl/geometry/vector.go:43:		isZeroVector			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:50:		vectorSubtract			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:60:		vectorCross			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:70:		normalizeVector			75.0%
github.com/github/gh-skyline/stl/stl.go:50:			writeFloat32			100.0%
github.com/github/gh-skyline/stl/stl.go:56:			writePoint3D			100.0%
github.com/github/gh-skyline/stl/stl.go:64:			writeSTLHeader			80.0%
github.com/github/gh-skyline/stl/stl.go:75:			writeTriangleCount		66.7%
github.com/github/gh-skyline/stl/stl.go:84:			writeTrianglesData		72.7%
github.com/github/gh-skyline/stl/stl.go:117:			WriteSTLBinary			68.2%
github.com/github/gh-skyline/stl/stl.go:159:			writeTriangleToBuffer		88.9%
github.com/github/gh-skyline/types/types.go:19:			IsAfter				100.0%
github.com/github/gh-skyline/types/types.go:30:			Validate			100.0%
github.com/github/gh-skyline/types/types.go:65:			IsValid				100.0%
github.com/github/gh-skyline/types/types.go:82:			ToFloat32			100.0%
github.com/github/gh-skyline/types/types.go:99:			Validate			100.0%
github.com/github/gh-skyline/types/types.go:125:		ToFloat32			100.0%
total:								(statements)			78.6%

Copy link

github-actions bot commented Dec 9, 2024

Code Coverage Report

github.com/github/gh-skyline/ascii/generator.go:19:		GenerateASCII			87.1%
github.com/github/gh-skyline/ascii/generator.go:87:		sortContributionDays		85.0%
github.com/github/gh-skyline/ascii/generator.go:127:		getBlockType			100.0%
github.com/github/gh-skyline/ascii/generator.go:146:		getBlock			100.0%
github.com/github/gh-skyline/ascii/text.go:31:			centerText			100.0%
github.com/github/gh-skyline/errors/errors.go:28:		Error				100.0%
github.com/github/gh-skyline/errors/errors.go:36:		New				100.0%
github.com/github/gh-skyline/errors/errors.go:46:		Wrap				100.0%
github.com/github/gh-skyline/errors/errors.go:69:		Is				100.0%
github.com/github/gh-skyline/errors/errors.go:78:		Unwrap				100.0%
github.com/github/gh-skyline/github/client.go:28:		NewClient			100.0%
github.com/github/gh-skyline/github/client.go:33:		GetAuthenticatedUser		100.0%
github.com/github/gh-skyline/github/client.go:48:		FetchContributions		94.4%
github.com/github/gh-skyline/github/client.go:111:		GetUserJoinYear			93.3%
github.com/github/gh-skyline/logger/logger.go:23:		String				100.0%
github.com/github/gh-skyline/logger/logger.go:44:		GetLogger			100.0%
github.com/github/gh-skyline/logger/logger.go:59:		SetLevel			100.0%
github.com/github/gh-skyline/logger/logger.go:66:		logf				91.7%
github.com/github/gh-skyline/logger/logger.go:90:		Debug				100.0%
github.com/github/gh-skyline/logger/logger.go:95:		Info				100.0%
github.com/github/gh-skyline/logger/logger.go:100:		Warning				0.0%
github.com/github/gh-skyline/logger/logger.go:105:		Error				100.0%
github.com/github/gh-skyline/main.go:103:			init				100.0%
github.com/github/gh-skyline/main.go:113:			main				0.0%
github.com/github/gh-skyline/main.go:121:			formatYearRange			100.0%
github.com/github/gh-skyline/main.go:129:			generateOutputFilename		50.0%
github.com/github/gh-skyline/main.go:142:			generateSkyline			72.5%
github.com/github/gh-skyline/main.go:219:			defaultGitHubClient		0.0%
github.com/github/gh-skyline/main.go:228:			fetchContributionData		87.5%
github.com/github/gh-skyline/main.go:245:			parseYearRange			86.7%
github.com/github/gh-skyline/main.go:272:			validateYearRange		100.0%
github.com/github/gh-skyline/main.go:284:			openGitHubProfile		100.0%
github.com/github/gh-skyline/stl/generator.go:15:		GenerateSTL			100.0%
github.com/github/gh-skyline/stl/generator.go:29:		GenerateSTLRange		66.7%
github.com/github/gh-skyline/stl/generator.go:77:		validateInput			88.9%
github.com/github/gh-skyline/stl/generator.go:93:		calculateDimensions		87.5%
github.com/github/gh-skyline/stl/generator.go:114:		findMaxContributions		100.0%
github.com/github/gh-skyline/stl/generator.go:127:		findMaxContributionsAcrossYears	100.0%
github.com/github/gh-skyline/stl/generator.go:147:		generateModelGeometry		94.7%
github.com/github/gh-skyline/stl/generator.go:188:		generateBase			44.4%
github.com/github/gh-skyline/stl/generator.go:205:		generateText			58.3%
github.com/github/gh-skyline/stl/generator.go:228:		generateLogo			44.4%
github.com/github/gh-skyline/stl/generator.go:243:		estimateTriangleCount		100.0%
github.com/github/gh-skyline/stl/generator.go:260:		generateColumnsForYearRange	72.7%
github.com/github/gh-skyline/stl/generator.go:281:		CreateContributionGeometry	80.0%
github.com/github/gh-skyline/stl/geometry/assets.go:16:		writeTempFont			62.5%
github.com/github/gh-skyline/stl/geometry/assets.go:47:		getEmbeddedImage		56.2%
github.com/github/gh-skyline/stl/geometry/geometry.go:46:	NormalizeContribution		100.0%
github.com/github/gh-skyline/stl/geometry/geometry.go:66:	CreateContributionGeometry	92.3%
github.com/github/gh-skyline/stl/geometry/geometry.go:92:	CalculateMultiYearDimensions	100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:11:		CreateQuad			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:24:		CreateCuboidBase		100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:31:		CreateColumn			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:44:		CreateCube			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:61:		createBox			100.0%
github.com/github/gh-skyline/stl/geometry/text.go:65:		Create3DText			0.0%
github.com/github/gh-skyline/stl/geometry/text.go:112:		renderText			0.0%
github.com/github/gh-skyline/stl/geometry/text.go:165:		GenerateImageGeometry		83.3%
github.com/github/gh-skyline/stl/geometry/text.go:190:		renderImage			84.6%
github.com/github/gh-skyline/stl/geometry/text.go:245:		isPixelActive			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:12:		validateVector			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:22:		calculateNormal			88.9%
github.com/github/gh-skyline/stl/geometry/vector.go:43:		isZeroVector			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:50:		vectorSubtract			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:60:		vectorCross			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:70:		normalizeVector			75.0%
github.com/github/gh-skyline/stl/stl.go:50:			writeFloat32			100.0%
github.com/github/gh-skyline/stl/stl.go:56:			writePoint3D			100.0%
github.com/github/gh-skyline/stl/stl.go:64:			writeSTLHeader			80.0%
github.com/github/gh-skyline/stl/stl.go:75:			writeTriangleCount		66.7%
github.com/github/gh-skyline/stl/stl.go:84:			writeTrianglesData		72.7%
github.com/github/gh-skyline/stl/stl.go:117:			WriteSTLBinary			68.2%
github.com/github/gh-skyline/stl/stl.go:159:			writeTriangleToBuffer		88.9%
github.com/github/gh-skyline/types/types.go:19:			IsAfter				100.0%
github.com/github/gh-skyline/types/types.go:30:			Validate			100.0%
github.com/github/gh-skyline/types/types.go:65:			IsValid				100.0%
github.com/github/gh-skyline/types/types.go:82:			ToFloat32			100.0%
github.com/github/gh-skyline/types/types.go:99:			Validate			100.0%
github.com/github/gh-skyline/types/types.go:125:		ToFloat32			100.0%
total:								(statements)			78.6%

Copy link

github-actions bot commented Dec 9, 2024

Code Coverage Report

github.com/github/gh-skyline/ascii/generator.go:19:		GenerateASCII			87.1%
github.com/github/gh-skyline/ascii/generator.go:87:		sortContributionDays		85.0%
github.com/github/gh-skyline/ascii/generator.go:127:		getBlockType			100.0%
github.com/github/gh-skyline/ascii/generator.go:146:		getBlock			100.0%
github.com/github/gh-skyline/ascii/text.go:31:			centerText			100.0%
github.com/github/gh-skyline/errors/errors.go:28:		Error				100.0%
github.com/github/gh-skyline/errors/errors.go:36:		New				100.0%
github.com/github/gh-skyline/errors/errors.go:46:		Wrap				100.0%
github.com/github/gh-skyline/errors/errors.go:69:		Is				100.0%
github.com/github/gh-skyline/errors/errors.go:78:		Unwrap				100.0%
github.com/github/gh-skyline/github/client.go:28:		NewClient			100.0%
github.com/github/gh-skyline/github/client.go:33:		GetAuthenticatedUser		100.0%
github.com/github/gh-skyline/github/client.go:48:		FetchContributions		94.4%
github.com/github/gh-skyline/github/client.go:111:		GetUserJoinYear			93.3%
github.com/github/gh-skyline/logger/logger.go:23:		String				100.0%
github.com/github/gh-skyline/logger/logger.go:44:		GetLogger			100.0%
github.com/github/gh-skyline/logger/logger.go:59:		SetLevel			100.0%
github.com/github/gh-skyline/logger/logger.go:66:		logf				91.7%
github.com/github/gh-skyline/logger/logger.go:90:		Debug				100.0%
github.com/github/gh-skyline/logger/logger.go:95:		Info				100.0%
github.com/github/gh-skyline/logger/logger.go:100:		Warning				0.0%
github.com/github/gh-skyline/logger/logger.go:105:		Error				100.0%
github.com/github/gh-skyline/main.go:103:			init				100.0%
github.com/github/gh-skyline/main.go:113:			main				0.0%
github.com/github/gh-skyline/main.go:121:			formatYearRange			100.0%
github.com/github/gh-skyline/main.go:129:			generateOutputFilename		50.0%
github.com/github/gh-skyline/main.go:142:			generateSkyline			72.5%
github.com/github/gh-skyline/main.go:219:			defaultGitHubClient		0.0%
github.com/github/gh-skyline/main.go:228:			fetchContributionData		87.5%
github.com/github/gh-skyline/main.go:245:			parseYearRange			86.7%
github.com/github/gh-skyline/main.go:272:			validateYearRange		100.0%
github.com/github/gh-skyline/main.go:284:			openGitHubProfile		100.0%
github.com/github/gh-skyline/stl/generator.go:15:		GenerateSTL			100.0%
github.com/github/gh-skyline/stl/generator.go:29:		GenerateSTLRange		66.7%
github.com/github/gh-skyline/stl/generator.go:77:		validateInput			88.9%
github.com/github/gh-skyline/stl/generator.go:93:		calculateDimensions		87.5%
github.com/github/gh-skyline/stl/generator.go:114:		findMaxContributions		100.0%
github.com/github/gh-skyline/stl/generator.go:127:		findMaxContributionsAcrossYears	100.0%
github.com/github/gh-skyline/stl/generator.go:147:		generateModelGeometry		94.7%
github.com/github/gh-skyline/stl/generator.go:188:		generateBase			44.4%
github.com/github/gh-skyline/stl/generator.go:205:		generateText			58.3%
github.com/github/gh-skyline/stl/generator.go:228:		generateLogo			44.4%
github.com/github/gh-skyline/stl/generator.go:243:		estimateTriangleCount		100.0%
github.com/github/gh-skyline/stl/generator.go:260:		generateColumnsForYearRange	72.7%
github.com/github/gh-skyline/stl/generator.go:281:		CreateContributionGeometry	80.0%
github.com/github/gh-skyline/stl/geometry/assets.go:16:		writeTempFont			62.5%
github.com/github/gh-skyline/stl/geometry/assets.go:47:		getEmbeddedImage		56.2%
github.com/github/gh-skyline/stl/geometry/geometry.go:46:	NormalizeContribution		100.0%
github.com/github/gh-skyline/stl/geometry/geometry.go:66:	CreateContributionGeometry	92.3%
github.com/github/gh-skyline/stl/geometry/geometry.go:92:	CalculateMultiYearDimensions	100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:11:		CreateQuad			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:24:		CreateCuboidBase		100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:31:		CreateColumn			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:44:		CreateCube			100.0%
github.com/github/gh-skyline/stl/geometry/shapes.go:61:		createBox			100.0%
github.com/github/gh-skyline/stl/geometry/text.go:65:		Create3DText			0.0%
github.com/github/gh-skyline/stl/geometry/text.go:112:		renderText			0.0%
github.com/github/gh-skyline/stl/geometry/text.go:165:		GenerateImageGeometry		83.3%
github.com/github/gh-skyline/stl/geometry/text.go:190:		renderImage			84.6%
github.com/github/gh-skyline/stl/geometry/text.go:245:		isPixelActive			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:12:		validateVector			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:22:		calculateNormal			88.9%
github.com/github/gh-skyline/stl/geometry/vector.go:43:		isZeroVector			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:50:		vectorSubtract			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:60:		vectorCross			100.0%
github.com/github/gh-skyline/stl/geometry/vector.go:70:		normalizeVector			75.0%
github.com/github/gh-skyline/stl/stl.go:50:			writeFloat32			100.0%
github.com/github/gh-skyline/stl/stl.go:56:			writePoint3D			100.0%
github.com/github/gh-skyline/stl/stl.go:64:			writeSTLHeader			80.0%
github.com/github/gh-skyline/stl/stl.go:75:			writeTriangleCount		66.7%
github.com/github/gh-skyline/stl/stl.go:84:			writeTrianglesData		72.7%
github.com/github/gh-skyline/stl/stl.go:117:			WriteSTLBinary			68.2%
github.com/github/gh-skyline/stl/stl.go:159:			writeTriangleToBuffer		88.9%
github.com/github/gh-skyline/types/types.go:19:			IsAfter				100.0%
github.com/github/gh-skyline/types/types.go:30:			Validate			100.0%
github.com/github/gh-skyline/types/types.go:65:			IsValid				100.0%
github.com/github/gh-skyline/types/types.go:82:			ToFloat32			100.0%
github.com/github/gh-skyline/types/types.go:99:			Validate			100.0%
github.com/github/gh-skyline/types/types.go:125:		ToFloat32			100.0%
total:								(statements)			78.6%

@chrisreddington chrisreddington changed the title Update Go development environment and enhance linting Update Go development environment, enhance linting and minor CI tweaks Dec 9, 2024
@chrisreddington
Copy link
Collaborator Author

Setting VALIDATE_YAML_PRETTIER to false for now. Based on super-linter/super-linter#6378 - it seems that handling symlinks are a known issue.

@chrisreddington chrisreddington merged commit a548808 into main Dec 9, 2024
18 checks passed
@chrisreddington chrisreddington deleted the standardise-linting branch December 9, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: Investigate linters being used across different dev stages
1 participant