Skip to content

Commit

Permalink
Revert "Convert examples only for schema lang (#1457)"
Browse files Browse the repository at this point in the history
This reverts commit 208af5f.
  • Loading branch information
t0yv0 committed Oct 25, 2023
1 parent 167777d commit 7d42a9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/tfgen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const (

func (l Language) shouldConvertExamples() bool {
switch l {
case Schema:
case Golang, NodeJS, Python, CSharp, Schema, PCL:
return true
}
return false
Expand Down
17 changes: 8 additions & 9 deletions pkg/tfgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,15 @@ func newTFGenCmd(pkg string, version string, prov tfbridge.ProviderInfo,
}

err := gen(opts)
if opts.Language.shouldConvertExamples() {
// Exporting collected coverage data to the directory specified by COVERAGE_OUTPUT_DIR
if coverageTrackingOutputEnabled {
err = coverageTracker.exportResults(coverageOutputDir)
} else {
fmt.Println("\nAdditional example conversion stats are available by setting COVERAGE_OUTPUT_DIR.")
}
fmt.Println(coverageTracker.getShortResultSummary())
printDocStats()

// Exporting collected coverage data to the directory specified by COVERAGE_OUTPUT_DIR
if coverageTrackingOutputEnabled {
err = coverageTracker.exportResults(coverageOutputDir)
} else {
fmt.Println("\nAdditional example conversion stats are available by setting COVERAGE_OUTPUT_DIR.")
}
fmt.Println(coverageTracker.getShortResultSummary())
printDocStats()

return err
}),
Expand Down

0 comments on commit 7d42a9e

Please sign in to comment.