Ignore:
Timestamp:
Oct 24, 2010, 12:05:25 AM (12 years ago)
Author:
Peter Johansson
Message:

remove print_copyright from Node interface since we use traverse to traverse node tree and only need to update copyright on File

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/copyright.cc

    r1164 r1238  
    2525#include "lib/Configuration.h"
    2626#include "lib/File.h"
     27#include "lib/main_utility.h"
    2728#include "lib/SVN.h"
    2829#include "lib/SVNinfo.h"
     
    6869  // warn about missing Copyright statement only in verbose mode
    6970  if (suite.verbose()){
    70     std::string config_str("[copyright]\nmissing-copyright-warning=yes");
    71     std::stringstream ss(config_str);
     71    std::stringstream ss;
     72    ss << "[copyright]\n"
     73       << "missing-copyright-warning=yes\n"
     74       << "[copyright-alias]\n"
     75       << "jari = jh\n"
     76       << "peter = pj\n";
    7277    Configuration& config = Configuration::instance();
    7378    config.load(ss);
     
    8590  File file(0,filename,"");
    8691 
    87   suite.out() << "Get stats for file" << std::endl;
    88   file.parse(suite.verbose(), true);
    89  
    90   suite.out() << "Updating copyright statements" << std::endl;
    91   std::map<std::string, Alias> alias;
    92   alias["jari"]=Alias("jh", 1);
    93   alias["peter"]=Alias("pj", 2);
    94  
    95   file.print_copyright(alias, suite.verbose());
     92  update_copyright(file, suite.verbose(), false);
    9693
    9794  is.open(filename.c_str());
Note: See TracChangeset for help on using the changeset viewer.