CI check generate code (#4998)

* call reflection code generation from tests

This simplifies instructions to contributors so they don't forget to update
reflection code.

* add error handling to generate_code scripts

Let them propagate their errors instead of swallowing them so they show
up when called in CI.

* apply editorconfig to shell scripts

* use ordered map in dart codegen

Using an unordered map in the codegen can lead to spurious diffs in the
generated dart code.

* add CI check for generate_code being run

* update reflection_generated.h

* disable diff-check for monster_test.bfbs

Work around #5008.
This commit is contained in:
Frank Benkstein
2018-10-22 15:41:12 -07:00
committed by Wouter van Oortmerssen
parent 5c0f914f38
commit efbb11e093
13 changed files with 99 additions and 12 deletions

View File

@@ -16,7 +16,6 @@
// independent from idl_parser, since this code is not needed for most clients
#include <cassert>
#include <unordered_map>
#include "flatbuffers/code_generators.h"
#include "flatbuffers/flatbuffers.h"
@@ -52,7 +51,7 @@ static const char *keywords[] = {
// and tables) and output them to a single file.
class DartGenerator : public BaseGenerator {
public:
typedef std::unordered_map<std::string, std::string> namespace_code_map;
typedef std::map<std::string, std::string> namespace_code_map;
DartGenerator(const Parser &parser, const std::string &path,
const std::string &file_name)