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

Initial proof of concept for an F#/FParser-based parser of the Semantic-Release-Notes format. #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

davidalpert
Copy link

The SemanticReleaseNotes F# project exposes a Parser.Parse(input) method that returns a partially-populated .NET object containing the parsed release notes. Similarly, a Parser.ParseAST(input) method returns an F# Discriminated Union AST of the parsed release notes.

The solution was created using VS2010 and F# 1.x so may require upgrading if opened with VS2012 and F# 3.x

This is an initial proof-of-concept, with an NUnit-based C# test project demonstrating usage and ApprovalTest-style approvals demonstrating verified output.

Known issues:

  • I had some issues with line endings on the saved approval files when pushing from one laptop to github to another laptop, hopefully the included .gitattributes file fixes those;
  • the object model and ASTToObjectModelVisitor need to be completed in order to finish populating the object model;
  • the AST and parser need to be enhanced to support the notion of "global" summary and items independent of any explicit header-introduced Sections;
  • the Json.NET reference and Semantic-Release-Notes-style JsonSerializationSettings can be pushed into the F# project to make generating JSON from input a one-method-call operation;
  • referencing Markdown.NET or similar would allow the F# project to generate HTML as a one-method-call operation;
  • the F# project's public surface area (i.e. the API visible to another .NET project after referencing the SemanticReleaseNotes assembly) can be cleaned up and finalized as desired using access modifiers and a more expressive structuring of the types relative to namespaces and modules.

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.

1 participant