Skip to content

chore: fix package docs that show the license header or nothing - #2694

Open
badalprasadsingh wants to merge 1 commit into
apache:mainfrom
badalprasadsingh:chore/package-doc-comments
Open

badalprasadsingh wants to merge 1 commit into
apache:mainfrom
badalprasadsingh:chore/package-doc-comments

Conversation

@badalprasadsingh

Copy link
Copy Markdown
Contributor

go doc and pkg.go.dev show the Apache license as the overview of table and puffin (table on pkg.go.dev from v0.8.0), because the license header touches the package line. nine other public packages have no doc.

adding the blank lines, a doc.go for ten packages, and staticcheck's ST1000 check, so lint catches both problems.

trade-offs:

  • new public packages must have a doc
  • the staticcheck list is spelled out and won't follow new golangci-lint defaults
  • the comments preset (it hid ST1000) is removed
  • internal packages and test files go unchecked

Signed-off-by: badalprasadsingh <badal@datazip.io>

@laskoviymishka laskoviymishka 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.

LGTM

Comment thread catalog/sql/doc.go
// under the License.

// Package sql implements a catalog that keeps table and view metadata
// locations in the same database tables as Java's JdbcCatalog. Import it to

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.

Should this mention the one place we diverge from Java? As I read it, the tables match, but a namespace with . inside a component is stored under a __iceberg_namespace_v1__: JSON key (sql.go), which Java's dot-joined namespaceToString never writes (JdbcUtil).

Comment thread catalog/sql/doc.go
Comment on lines +20 to +21
// register the "sql" catalog type. That type needs the "sql.dialect" property
// and a "sql.driver" property naming a registered database/sql driver.

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.

These strings are the exported DialectKey and DriverKey constants, so we could link them and keep the values:

Suggested change
// register the "sql" catalog type. That type needs the "sql.dialect" property
// and a "sql.driver" property naming a registered database/sql driver.
// register the "sql" catalog type. That type needs the [DialectKey]
// ("sql.dialect") property and a [DriverKey] ("sql.driver") property naming a
// registered database/sql driver.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants