Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore(codeintel): Use internal language detection package for insights#63254

Merged
mmanela merged 10 commits into
mainfrom
mattmanela/graph-663-update-insights-code-to-use-languages-go-enry-wrapper
Jun 17, 2024
Merged

chore(codeintel): Use internal language detection package for insights#63254
mmanela merged 10 commits into
mainfrom
mattmanela/graph-663-update-insights-code-to-use-languages-go-enry-wrapper

Conversation

@mmanela

@mmanela mmanela commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Updates two more places to use the common language detection package (which wraps go-enry) instead of using go-enry directly. This provides us more flexibility and ensures a consistent mechanisms across the product.

  • cmd/frontend/internal/inventory/inventory.go
  • internal/compute/template.go

Test plan

  • Updated unit tests

Changelog

  • Code clean up to use common language detection mechanism in more places

Comment thread lib/codeintel/languages/languages.go Outdated
Comment thread lib/codeintel/languages/languages.go Outdated
Comment thread lib/codeintel/languages/languages.go Outdated

@camdencheek camdencheek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending open comments. Thanks Matt!

Comment thread lib/codeintel/languages/languages.go Outdated
Comment thread lib/codeintel/languages/languages.go Outdated

@varungandhi-src varungandhi-src left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the GetFirstMatchingLanguage function.

@mmanela mmanela requested a review from varungandhi-src June 14, 2024 15:35
@varungandhi-src

Copy link
Copy Markdown
Contributor

@mmanela mmanela merged commit 53007da into main Jun 17, 2024
@mmanela mmanela deleted the mattmanela/graph-663-update-insights-code-to-use-languages-go-enry-wrapper branch June 17, 2024 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants