Skip to content
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

correct comments mistake in all packages #3120

Closed
19 of 29 tasks
zhexuany opened this issue Apr 23, 2017 · 24 comments
Closed
19 of 29 tasks

correct comments mistake in all packages #3120

zhexuany opened this issue Apr 23, 2017 · 24 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@zhexuany
Copy link
Contributor

zhexuany commented Apr 23, 2017

  • ddl
  • executor
  • expression
  • inspectkv
  • model
  • privilege
  • statistics
  • terror
  • kv
  • mysql
  • server
  • store
  • tidb-server
  • ast
  • parser
  • structure
  • cmd
  • domain
  • meta
  • perfschema
  • table
  • context
  • executor
  • infoschema
  • plan
  • sessionctx
  • tablecodec
  • util
  • bootstrap
    the workflow is the following,
$ cd tidb
$ cd ddl //ddl is just a package in tidb, you need change to another one.
$ goword $(find . -name '*.go' | grep -v -e  #"^./_vendor")

Based on the error info, you can improve the original comments.

If you did not install goword, just make goword. Please register your PR in this issue and ping me to update todo list.

@zhexuany
Copy link
Contributor Author

zhexuany commented Apr 23, 2017

ddl is done. #3119

@zhexuany
Copy link
Contributor Author

@coocood Please label this as help-wanted and for new-contributor

@coocood coocood added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Apr 23, 2017
@zhexuany
Copy link
Contributor Author

util is done #3121

@hongyuanw
Copy link
Contributor

tablecodec is done #3122

@gaocegege
Copy link
Contributor

gaocegege commented Apr 23, 2017

#dibs expression :)

expression is done #3123

@coocood
Copy link
Member

coocood commented Apr 24, 2017

@zhexuany @gaocegege @yuanwhy
Thank you for all your help.
I want to share some tips when you find adding comments for a function is not straightforward.

There may be some functions that you don't fully understand what it does, literally explain the function name may be misleading. In this case, we can add comment like this:

// abcFunc ...
fucn abcFuc () {
    doSomething()
}

gaocegege added a commit to gaocegege/tidb that referenced this issue Apr 25, 2017
@hongyuanw
Copy link
Contributor

bootstrap is done #3182

@hongyuanw
Copy link
Contributor

model is done #3183

@hongyuanw
Copy link
Contributor

table is done #3184

@hongyuanw
Copy link
Contributor

hongyuanw commented Apr 29, 2017

perfschema is done #3186

@knarfeh
Copy link
Contributor

knarfeh commented May 1, 2017

cmd, meta, domain, sessionctx are done #3191 #3192

@zhexuany
Copy link
Contributor Author

zhexuany commented May 1, 2017

executor is done: #3187

@louishust
Copy link
Contributor

@zhexuany infoschema is done: #3239

@louishust
Copy link
Contributor

privilege is done: #3250

@louishust
Copy link
Contributor

expression is done: #3272

@ladrift
Copy link
Contributor

ladrift commented Oct 5, 2017

statistics is done: #4711

@ladrift
Copy link
Contributor

ladrift commented Oct 9, 2017

Ping @zhexuany for updating the task status.

@zhexuany
Copy link
Contributor Author

zhexuany commented Oct 9, 2017

@ladrift Thanks. Just updated.

@Angryrou
Copy link
Contributor

kv is done: #6829

@kuafou
Copy link
Contributor

kuafou commented Sep 11, 2018

Ping @zhexuany mysql and server are done: #7661

@kuafou
Copy link
Contributor

kuafou commented Sep 15, 2018

Ping @zhexuany expression package still has comments mistake error.

➜  expression git:(qi_json) ✗ git commit -am "don't konw how to do... "
Checking for files that need gofmt... OK

Checking for files that need goword... ERROR!
Some files may have spelling errors.
copy and paste the following for where fails this test:
  goword expression/builtin_json.go

Aborting commit

➜  tidb git:(qi_json) ✗ goword expression/*.go
expression/builtin_arithmetic.go.92: // setFlenDecimal4Real is called to set proper `Flen` and `Decimal` of return (godoc-local: setFlenDecimal4Real -> setFlenDecimal4RealOrDecimal?)
expression/builtin_control.go.57: // Infer result type for builtin IF, IFNULL && NULLIF. (godoc-local: Infer -> inferType4ControlFuncs?)
expression/builtin_control.go.432: // See https://dev.mysql.com/doc/refman/5.7/en/control-flow-functions.html#function_if (godoc-local: See -> getFunction?)
expression/builtin_info.go.185: // eval evals a builtinUserSig. (godoc-local: eval -> evalString?)
expression/builtin_info_test.go.171: // Test case for tidb_server(). (godoc-export: Test -> TestTiDBVersion?)
expression/builtin_json.go.55: // Type of JSON value. (godoc-export: Type -> _?)
expression/builtin_json.go.57: // Unquote JSON value. (godoc-export: Unquote -> _?)
expression/builtin_json.go.59: // Create JSON array. (godoc-export: Create -> _?)
expression/builtin_json.go.61: // Create JSON object. (godoc-export: Create -> _?)
expression/builtin_json.go.63: // Return data from JSON document. (godoc-export: Return -> _?)
expression/builtin_json.go.65: // Insert data into JSON document. (godoc-export: Insert -> _?)
expression/builtin_json.go.67: // Insert data into JSON document. (godoc-export: Insert -> _?)
expression/builtin_json.go.69: // Replace values in JSON document. (godoc-export: Replace -> _?)
expression/builtin_json.go.71: // Remove data from JSON document. (godoc-export: Remove -> _?)
expression/builtin_json.go.73: // Merge JSON documents, preserving duplicate keys. (godoc-export: Merge -> _?)
expression/builtin_json.go.75: // Check JSON document contains specific target. (godoc-export: Check -> _?)
expression/builtin_math.go.539: // evalDec evals a builtinCeilIntToDecSig. (godoc-local: evalDec -> evalDecimal?)
expression/builtin_math.go.591: // evalDec evals a builtinCeilDecToDecSig. (godoc-local: evalDec -> evalDecimal?)
expression/builtin_math.go.724: // evalDec evals a builtinFloorIntToDecSig. (godoc-local: evalDec -> evalDecimal?)
expression/builtin_math.go.776: // evalDec evals a builtinFloorDecToDecSig. (godoc-local: evalDec -> evalDecimal?)
expression/builtin_math.go.1674: // evalreal evals a builtinSinSig. (godoc-local: evalreal -> evalReal?)
expression/builtin_math.go.1707: // eval evals a builtinTanSig. (godoc-local: eval -> evalReal?)
expression/builtin_other.go.105: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInIntSig?)
expression/builtin_other.go.154: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInStringSig?)
expression/builtin_other.go.187: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInRealSig?)
expression/builtin_other.go.220: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInDecimalSig?)
expression/builtin_other.go.253: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInTimeSig?)
expression/builtin_other.go.286: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInDurationSig?)
expression/builtin_other.go.319: // See https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in (godoc-local: See -> builtinInJSONSig?)
expression/builtin_time.go.584: // calculateTimeDiff calculates interval difference of two types.Duration. (godoc-local: calculateTimeDiff -> calculateDurationTimeDiff?)
expression/builtin_time.go.1005: // See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_monthname (godoc-local: See -> monthNameFunctionClass?)
expression/builtin_time.go.1747: // See https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_str-to-date (godoc-local: See -> getFunction?)
expression/builtin_time.go.1846: // TODO: If the NO_ZERO_DATE or NO_ZERO_IN_DATE SQL mode is enabled, zero dates or part of dates are disallowed. (godoc-local: TODO: -> evalDuration?)
expression/builtin_time.go.4963: // evalTime evals a builtinSubTimeDurationNullSig. (godoc-local: evalTime -> evalDuration?)
expression/builtin_time.go.5073: // See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_time-format (godoc-local: See -> formatTime?)
expression/column.go.151: // This id is used to specify whether this column is ExtraHandleColumn or to access histogram. (godoc-export: This -> ID?)
expression/column.go.151: // This id is used to specify whether this column is ExtraHandleColumn or to access histogram. (godoc-export: This -> ID?)
expression/simple_rewriter.go.232: // 1. If op are EQ or NE or NullEQ, constructBinaryOpFunctions converts (a0,a1,a2) op (b0,b1,b2) to (a0 op b0) and (a1 op b1) and (a2 op b2) (godoc-local: 1. -> constructBinaryOpFunction?)

@hueypark
Copy link
Contributor

store is done. #9190

@hueypark
Copy link
Contributor

everything is done. #9219

@ghost
Copy link

ghost commented Aug 3, 2020

I am going to close this issue as stale. I ran a goword check, and there are 500+ lines, but nothing looked obviously wrong.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

10 participants