-
Notifications
You must be signed in to change notification settings - Fork 600
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
XML doc comments coverage (edits & additions) #682
XML doc comments coverage (edits & additions) #682
Conversation
e6acf88
to
1dbf26c
Compare
@Ste1io thanks for fixing this up :) |
Morning gents, wrapping up the remaining xml doc comments for all things async before the weekend. Do you want the leading spaces for summary and remarks sections added back in, or left as is? Also, what's the magic number for the column breaks? |
@Ste1io I don't mind regarding leading space or not, so long as it's consistent. Regarding doc comments length, pick something that works for you but isn't too constrained for everyone... maybe something between 80 - 160 etc |
@pleb will do. Plan on wrapping this PR up over the weekend or early next week. What do you want me to do about the changes to the doc tests? |
Aside from some minor fix-ups and any additional changes following code review, xml doc comments are finished. So as not to contribute to the loss of your sanity, I batched all relocated code into two commits, so the actual changes can be easily diffed without making your eyes bleed. Expect these commits to get pushed to remote shortly. |
ac80468
to
4685158
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e294f5b is the best commit to compare diffs for additional changes after this point, as everything is a line-for-line match.
I've got a dozen or so issues that surfaced while doing the doc comments. They all need to be addressed, but they aren't related to my changes. I started adding them in this thread, but as some of them are breaking changes (changes with interface contracts, as one example), I'd rather avoid holding up this PR until a major release because preexisting issues are associated with it. Any preference with how I go about them? Bulk them up in a couple of issues, or an issue for each? They're all fairly easy to fix, and I'll be happy to front the grunt work with fixing them (I have a local branch with many of the fixes already implemented, as it stands), but pushing to a release build would require a major version bump. For context, here's a portion of the todo comment dump so you know what I'm referring to (objective observations only; opinionated ideas are omitted for another discussion on another day :)):
For future reference, line references above correspond with 5cd6bdb. There's also a heap of "not broken but worth discussing" notes that would all fit into at least a partial refactor (v7?!?), which I've omitted here, as they should probably best be proposed with a discussion so everything is somewhat coherent. [edit] Not sure what I was thinking earlier, but passing in a cancellation token for abort/close/cleanup isn't going to be very productive. 🤦🏻♂️ Removed those from the dump above. |
After @asherber is finished looking over anything and any changes following are sorted, I'll update this branch with the text wrap and we should be all set. You want me to squash down these commits on that final commit, or leave them as is and let you handle that how you want when you merge in the PR? |
@pleb and @asherber I made one final commit that fixes some terminology and unifies the doc comments for matching params across the code base. The only change left is to rewrap the doc comments blocks; I'm holding off on that until I get a confirmation that this PR is ready to merge in since comparing diffs trends to be easier without. |
All good, @Ste1io. If the tests are passing, I say it's good to go |
All Sqlite tests pass. I need to get my docker setup sorted before I can test the others, but will advise as soon as that's done. |
Finally got around to restarting my pc (a rare occurrence) and reconfiguring virtualization in BIOS again since replacing my mobo and processor earlier this year, so I'm good to go with docker once more. Which brings me to my question... How long has it been since the full test suite has been run for all dbms? |
18a3e4a
to
a0c05df
Compare
a4139eb
to
a0c05df
Compare
a0c05df
to
f6cc66f
Compare
- remove leading/trailing whitespace - merge multiline sections into single line fix typos, spelling, grammar, inline tag usage: - add closing punctuation for all doc comments - correct grammar, spelling, sentence structure - consistently aussie-ise inflection classes - replace inline "seealso" tags with "see" tags (seealso is toplevel) - use inheritdoc where appropriate - populate present but empty doc comment tags Create .editorconfig generated from current styles update existing comments for consistency - use "langword=" for null|true|false - use <value> for properties, <returns> for methods - use "Gets..."|"Gets or sets..." verbiage for property summaries - use "Returns..." verbiage for method summaries - split lengthy summaries into <remarks> section - use <example><code> sections - consistent section order (<remarks> second, <exception> at end) - add a few sparse missing sections add xml doc comments associated code changes: AnsiStringExtensions.cs - cleanup: removed unused usings PagingHelper.cs - public Regex fields converted to cached properties with get accessors (.NET framework guidelines discourage publicly visible fields) ColumnAttribute.cs - ForceToUtc moved below ForceToDateTime2 ValueConverterAttribute.cs - ConvertToDb moved below ConvertFromDb (order used in IMapper, ConventionMapper, StandardMapper) add xml doc comments for db providers - fix typo from previous commit, reverting "@param" change - reverted some renamed params (mainly "cmd") since inheritdoc can be picky if inheritance tree param names aren't identical - moved a couple definitions for ExecuteInsertAsync to below their synchronous counterpart add xml doc comments for IAsyncReader/AsyncReader PocoColumn, ColumnInfo prep - update order of properties for consistency - make public fields properties with get, set methods add xml doc comments for column related classes improve xml doc comments for Inflector - readability - use inheritdoc for EnglishEnflector class - add commonly used casing name and short example to summary/remarks - what? no RUDERISE method?!? misc xml doc comment fixes - typos (?param, not @param) - add missing exceptions - disable warning 1998 (Async method lacks 'await' operators) for conditionally-compiled CleanupTransactionAsync method - change inheritdoc strat for IGridReader, removing need to disable warning 1712 - remove unused usings add xml doc comments for IExecute/Async, IStoredProc/Async add region scopes to IAlterPoco/Async, IQuery/Async fix tests: - comment typo corrections - remove unneeded truncate calls for doc tests
…s of related methods and overloads. no code changes present in this commit; only code locality changes and region scope naming.
f6cc66f
to
24dedd0
Compare
- Database.cs - ColumnInfo.cs - IGridReader.cs - PocoData.cs - AsyncReader.cs - DatabaseConfigurationExtensions.cs - Interfaces (db operations) - Attribute classes add missing `#if ASYNC` scopes, fix disparite usage of `!NET40` to wrap async methods: - IAlterPocoAsync.cs - IConnection.cs - IStoredProcAsync.cs renamed parameter names for variables and callback methods: - DatabaseConfigurationExtensions.cs `configure`->`cofigurer` - IGridReader.cs `func`->`projector` - IQuery.cs `cb`->`projector` `itemsPerPage`->`maxItemsPerPage` `sqlCount`->`countSql` (match countArgs format) `sqlPage`->`pageSql` (match pageArgs format) `primaryKey`->`pocoOrPrimaryKey` (selective for specific context...eg `Exists`, `ExistsAsync`) - IQueryAsync.cs `receivePocoCallback`->`action` `itemsPerPage`->`maxItemsPerPage` `sqlCount`->`countSql` (match countArgs format) `sqlPage`->`pageSql` (match pageArgs format) - IStoredProcAsync.cs `receivePocoCallback`->`action` - ParametersHelper.cs `args_src`->`srcArgs` (consistent naming convention for public visible parameters) `args_dest`->`destArgs` (consistent naming convention for public visible parameters) renamed type names: - DatabaseConfigurationExtensions.cs `T`->`TProvider` `T`->`TMapper` - IGridReader.cs `TRet`->`TResult` - IQuery.cs `TRet`->`TResult` - IQueryAsync.cs other notable changes - bugs: see todo comments - Page{T}, IQuery, IQueryAsync: switch from "itemsPerPage" to "maxItemsPerPage" add todos consistent wording touchups: - <typeparam> - <param name="cancellationToken"> - <returns> (async) fix indentation differences (tabs vs. spaces) add remarks about primary key during insert op when executed from Save/SaveAsync methods consistency changes in wording fix Single/SingleAsync, SingleOrDefault/SingleOrDefaultAsync comments consistent use of primaryKey for pk value, vs primaryKeyName for column name tightened up some of the terminology referencing specific sql statement parts (eg consistent use of dbms' terms such as clauses, conjunctions, commands vs queries, etc) consistent inline null tags param doc strings improvements, consistent wording param name change for clarity: - ColumnAttribute.cs, ResultColumnAttribute.cs: name->column - Database.cs conn->connection pd->pocoData pc->pocoColumn - DatabaseConfiguration.cs setSetting->getSetting onFail->onFailAction - IBuildConfigurationSettings.cs getSetting->onGetAction onFail->onFailAction - IQueryAsync.cs sqlCondition->sql - ParametersHelper.cs setParameterProperties->setPropertiesAction paramPrefix->replacementPrefix input->value - PocoData countColumns-columnCount Mappers class: consistent terminology usage (revoke vs remove). ParametersHelper: move private IsEnumerable method below public methods Sql class: consistent phrasing and terminology, specify class mutability in class summary xml cref fixes for SaveAsync doc comments Final dust off: - spell check - minor adjustments in word usage for consistency (auto-select vs AutoSelect, etc) - completed exception documentation; call forwarding wrappers that do nothing more than wrap a call now document any exceptions thrown by the method they forward to - add some todos to review with exception handling - made exception for some exceptions: document exceptions for Single,SingleOrDefault,First,FirstOrDefault (and async versions) in interface, since by nature those methods are contractually required to follow specific exception handling guidelines
consistent spacing before self-closing tags
24dedd0
to
bfcdade
Compare
- resolves todo re inconsistent exception types - increases test case coverage for possible parameter combinations there are numerous other methods that need their exception handling changed similarly, in a new PR
All tests pass. Ready to merge @pleb |
A couple notes regarding the changes on this branch:
<section>...</section>
,<remarks>...</remarks>
, etc) have been combined into single lines./// foobar
=>/// foobar
).The above changes were to enable me to more easily parse through the existing comments to identify and fix any spelling errors or needed modifications. Also, it should make reviewing the diffs less cumbersome. Not to mention editing or writing comments while maintaining the appropriate line breaks is a pain in the @$$. :) Easier to just reapply the formatting when everything is ready for merging.
While my intention was to just add the missing doc comments causing the compiler warnings, it made more sense for me to do a full thorough review while I was at it. Ensuring consistency across the board will make implementing a static documentation site for GitHub pages (using docfx or something similar) that's generated from the code sooo much easier, if we choose to do that (imo, it would be a good idea). Most importantly, though, it's been very beneficial for me personally catching up with the changes to the library since the single-file days, which is helping shape out the direction for some of the new documentation tremendously.
Apologies in advance for such a huge amount of code for you guys to look over. I plan on squashing the commits when it's ready for merging, but leaving them as is in the meantime so that reviewing related changes between two consecutive commits is possible. Most of the changes in the first commit will evaporate with the final commit, but actual changes made to the existing comments I felt should be easily reviewed without formatting changes or additions crowding up the diffs.